extensions: attempt to use non-deprecated inspect method
Avoids some deprecation warnings when extension loading breaks.
Differential Revision: https://phab.mercurial-scm.org/D295
Run Mercurial tests with Vagrant:$ vagrant up$ vagrant ssh -c ./run-tests.sh