Serialize & RCPTID support

This is a pretty big one: it adds serialization support, and builds $RCPTID on top of it.