Updated Encoder/Decoder to match new trait signature.

This updates the serialization functions to match the new serialize::{Encoder, Decoder} trait definitions.

Needs fixing: Decoder.read_enum_variant now takes an FnOnce, but toml-rs's implementation expects to call its function argument multiple times. This patch replaces read_enum_variant with unimplemented!().