py3: account for demand import difference between Python versions

Authored by indygreg.

Description

py3: account for demand import difference between Python versions

Our lazy importer for Python 3 will validate that modules are
loadable before returning a stub module object. This is different
from Python 2, which will always return a stub module object.

While we could change behavior of the Python 3 demand importer,
that seems like a problem for another day.

This commit teaches test-extension.t about that difference in
behavior.

Differential Revision: https://phab.mercurial-scm.org/D5798