Manual pickling/unpickling

This is a performance improvement. See https://bugs.launchpad.net/oq-engine/+bug/1297086 for a justification and some numbers.