Support absence of wallet (pwalletMain==NULL) in several locations,
notably RPC.
Merge branch 'pwalletmain' - checking pwalletMain for NULL,
a pre-req for no-wallet support.