FUSE: lookup: add optional regex pre-condition
We should define an optional regex check in lookup to allow fast result for directories with specific entry formats (eg: archive, origin, history/by-date, etc.). This allow to bypass the O(N) loop for obvious wrong query.
One particular use case for this would be to prevent slowness when zsh is looking for .git/ entries in every parent directory.
Migrated from T2863 (view on Phabricator)