tests: add test demonstrating how broken third-party extensions can get
I intend to fix this, but will do the fix as a separate change to make
the behavior change obvious. This was inspired by some users having
the patience diff extension, which broke when we moved bdiff.so so
thoroughly the users can't even run 'hg debuginstall'.
extensions: move wrapfilecache function from fsmonitor
It makes more sense to put this in core, so other extensions can
trivially get access to it without having to rely on importing
fsmonitor.