WIP: Support metadata at de/serialization time (moved)

keeping https://github.com/pydata/pandas/pull/3297 alive, though the target PR branch was wrong.