Added a few validation functions

Support code for improving the validation in the engine. In particular to remove the pickled dictionaries causing https://bugs.launchpad.net/oq-engine/+bug/1361981
Apart from the SA(<T>) case, are we still checking if the IMT is included in a specific list of acceptable ones?