More portable way to detect modules for H302

Instead of analysing string representation of import exception we
try harder to import the thing and then look it up in sys.modules
-- if it was module it should be already there. This solution should
be more portable across python versions and implementations,
including Python 3 and PyPy.

Change-Id: I054968f78966961fcb72c744193092696235eafa
Merge "More portable way to detect modules for H302"