Split Trap into DecoderTrap and EncoderTrap.

This prevents through the type system using an encoder-only trap for decoding,
rather than having runtime failures.