Handle encoding/coercing/validation in the encoder

Rather than having the dispatcher coerce and validate responses or
handle that in a separate middleware, move it all into the encoder.
Remove the RPC failed callback

Instead of providing a callback hook that is fired when rpc_failed is
called, just take the given message and raise an RPC failed error.