Support daemon return codes

This is the groundwork for implementing #2
Add requested rpcwallet return codes

This needs testing, but it should hopefully implement #2