Add `type` attr to MFD and source classes

This branch adds `type` class attributes to source and MFD classes. This allows for a "softer" way to identify object types (as an alternative to `isinstance` checks).

These changes were introduced as part of https://bugs.launchpad.net/openquake/+bug/1045711 and help us to decouple `oq-hazardlib` from the `logictree` module in `oq-engine`.