Avoid search paths for ImportChecker when possible (#9595)

* Avoid search paths for ImportChecker when possible

If possible it is desirable to look for modules with no context file as
it results in no search paths being given to astroid's find_spec(). This
makes calls to it more uniform and opens up the possibility of effective
caching.

Refs #9310.
2 files changed