fsmonitor: change the distance calculation
Change the distance calculation in the fsmonitor extension. It is done
in a method since anticipated changes will need to use this logic as well.
Test Plan:
Tested on development server.
Differential Revision: https://phab.mercurial-scm.org/D988