Split Trap into DecoderTrap and EncoderTrap.

This prevents through the type system using an encoder-only trap for decoding,
rather than having runtime failures.
Merge branch 'master' into rust-0.9-pre