implement key marshaling
Merge pull request #8 from rogpeppe/004-key-marshaling

bakery: implement key marshaling