Make the event based calculator more debuggable

This is the companion PR to https://github.com/gem/oq-hazardlib/pull/225. Notice that now we are sorting the IMTs and the GSIMs to make sure that at each run the parameters enter in the same order. Also, in intermediate dictionaries we are using the IMT string representation as a key, not the IMT object. This makes it easier to debug problems.

The tests are green: https://ci.openquake.org/job/zdevel_oq-engine/576