Implement serialize::Decoder interface

Does not work yet due to an internal compiler error in rustc.