extension: add a `required` suboption to enforce the use of an extensions
If `required` is set, failing to load an extensions will abort. See the test
and documentation for details.
Differential Revision: https://phab.mercurial-scm.org/D11822
#require emacs
$ emacs -q -no-site-file -batch -l $TESTDIR/../contrib/hg-test-mode.el \
> -f ert-run-tests-batch-and-exit
Running 1 tests (*) (glob)
passed 1/1 hg-test-mode--compilation-mode-support* (glob)
Ran 1 tests, 1 results as expected* (glob)