Moved the openquake validation in commonlib

This closes several bugs. See https://bugs.launchpad.net/oq-engine/+bug/1320125, 

The tests are green: https://ci.openquake.org/job/zdevel_oq-commonlib/83/