Trust the directory cache in batch mode.
Trust the directory cache in batch mode.

When coqtop is a long-lived process (e.g. coqide), the user might be
creating files on the fly. So we have to ask the operating system whether
a file exists beforehand, so that we know whether the content of the
directory cache is outdated.

In batch mode, we can assume that the cache is always up-to-date, so we
don't need to query the operating system before trusting the content of
the cache.

On a script doing "Require Import Reals", this brings down the number of
stat syscalls from 42k to 2k. The number of syscalls could be further
halved if all_subdirs was filling the directory cache.

SkySkimmer/coq,Ptival/coq,Lionel-Rieg/coq,william-lawvere/coq,ppedrot/coq,coq/coq,ppedrot/coq,gares/coq,amintimany/coq,ejgallego/coq,ejgallego/coq,ejgallego/coq,Ptival/coq,gares/coq,Zimmi48/coq,maximedenes/coq,mattam82/coq,silene/coq,SkySkimmer/coq,gares/coq,letouzey/coq-wip,Zimmi48/coq,maximedenes/coq,mattam82/coq,maximedenes/coq,gares/coq,Matafou/coq,coq/coq,maximedenes/coq,william-lawvere/coq,amintimany/coq,silene/coq,letouzey/coq-wip,Lionel-Rieg/coq,silene/coq,herbelin/github-coq,maximedenes/coq,letouzey/coq-wip,Matafou/coq,mattam82/coq,JasonGross/coq,letouzey/coq-wip,ppedrot/coq,JasonGross/coq,gares/coq,ppedrot/coq,SkySkimmer/coq,JasonGross/coq,herbelin/github-coq,coq/coq,letouzey/coq-wip,SkySkimmer/coq,coq/coq,william-lawvere/coq,ppedrot/coq,JasonGross/coq,amintimany/coq,Zimmi48/coq,Lionel-Rieg/coq,Matafou/coq,herbelin/github-coq,Zimmi48/coq,Ptival/coq,ejgallego/coq