Make hex decoding consistent in RPC handlers.

The hex package requires an even number of characters in hex encoded
strings.  Some of the handlers already prepended a zero if necessary to
make this condition true, however other did not.  This commit extends this
functionality to all handlers and also makes the error return consistent.

ok @jrick