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
This is clear, but I am not sure it is the standard format for docstrings. Please check the same also in the "dictionary" method.