Manual pickling/unpickling

This is a performance improvement. See https://bugs.launchpad.net/oq-engine/+bug/1297086 for a justification and some numbers. The tests are running here: https://ci.openquake.org/job/zdevel_oq-engine/339