Rewrite hgfs fileserver backend

This commit adds the optimizations recently added to gitfs to hgfs, and
also adds the hgfs_base parameter for feature parity.
Add default values for hgfs_base
Add hgfs config params to docs
Fix two more hgfs bugs

This fixes two additional hgfs bugs:

1. _get_ref() never looks at bookmarks, making it impossible to serve
   files using a bookmark as an environment.

2. Exceptions during a pull (in a fileserver update) will cause the
   update() function to abort, failing to clear the fileserver update
   lockfile. Thanks to a bitbucket outage for helping uncover this one!
Adjust docs to reflect additional hgfs changes
Merge pull request #10289 from terminalmage/hgfs-rewrite

Make hgfs awesome