Implement getreceivedbyaddress RPC.

Unlike Bitcoin Core wallet, this implementation does not ignore
coinbase transactions.