Errors are no longer hidden by returning in-band values. Explicit
checks have also been added to test for hdkeychain.ErrInvalidChild
rather than assumming that any random error is an invalid BIP0032
child key derivation.
Some vars that didn't need to be were changed to const and moved to
the top of the file.
Use uint32 everywhere for indexes rather than mixing int and uint32
(I'm guessing this was largely thanks to Go's "type inferrence" rules
which default to int). Removes a lot of unnecessary type conversions
and makes the code a little less cluttered.
Since all of this code requires the consensus server RPC client, just
pass it in as a parameter and pass it around to all of the helper
functions instead of calling Wallet.requireChainClient from most of