Solved a long standing bug with inconsistent unpickling of the IMTs

This has been annoying me to no end in the engine side. See https://bugs.launchpad.net/oq-hazardlib/+bug/1322794