Improved bitcoinrpc logging and Decimal support

I'm writing some more regression tests, and need these changes from upstream.

One day maybe I'll figure out the right git subtree magic to pull part of Jeff's tree into this part of the core tree...