util: WARNING: breaks binary deserialization

This fixes the issue with serialization where keys have to be stored
in the map in the order in which they will be stored on disk. This
also allows for optional serialization / deserialization.

This updates the other pull request on serialization to remove the changes we discussed. This should not be merged before we release a new milestone or something similar.