Serialization revamp

Do a bunch of cleanup regarding serialisation and deserialisation.

Renames from_pson to from_data_hash (the opposite is called to_data_hash already), as this method is used by pretty much all formats, not just PSON.

It also unifies the to_pson code in one place, just like it was already done with to_msgpack.

Also a bit of simplification of the msgpack format code.