Move pMiningKey init out of StartRPCThreads

This commit decouples the pMiningKey initialization and shutdown from the RPC
threads.

`getwork` and `getblocktemplate` rely on pMiningKey, and can also be ran
from the debug window in the UI even when the RPC server is not running.

Solves issue #2706.

Conflicts:
	src/rpcmining.cpp
Minor miner fixes (hey hey it's fun to say)

* Fix UpdateCoins() definition in main.h
* Remove pwalletMain reference from BitcoinMiner(), as it is passed
  a wallet argument.

Conflicts:
	src/main.h

Rebased-from: 18946846d5c321d2afc11445580874c9a8bb0733
CreateNewBlock() now takes scriptPubKey argument,
rather than a key.

CreateNewBlockWithKey() helper is added to restore existing functionality,
making this an equivalent-transformation change.

Conflicts:
	src/miner.cpp
	src/miner.h

Rebased-from: fcc32b7b9ce5bc310cbad677da7e7bca3a01459a
RPC: getblocktemplate does not require a key, to create a block template

getblocktemplate only uses certain portions of the coinbase transaction,
notably ignoring the coinbase TX output entirely.

Use CreateNewBlock() rather than CreateNewBlockWithKey(), eliminating
the needless key passing.

Should be zero behavior changes.
miner: constify CreateNewBlock() arg scriptPubKeyIn

Conflicts:
	src/miner.cpp
	src/miner.h

Rebased-from: ad7d7cde5d30bcbfa7803c90daac7297b8a55e42
Support absence of wallet (pwalletMain==NULL) in several locations,
notably RPC.

Conflicts:
	src/init.cpp
	src/rpcmining.cpp
	src/rpcwallet.cpp
	src/bitcoinrpc.cpp

Rebased-from: 541a7fcd515a27ebaa3ae5f1a9a698dab3db6ead
RPC validateaddress: test pwalletMain for NULL (no-wallet mode)

Conflicts:
	src/rpcwallet.cpp

Rebased-from: b878f6a92436e3facd700e2e10c04f541cd6421b
init.cpp: cosmetic indent changes, preparing for no-wallet

Rebased-from: 520cc05b89aae5fed155482d5fa66b4290487d55

Conflicts:
	src/init.cpp
Add -disablewallet option, to disable wallet support (and BDB)

Conflicts:
	src/init.cpp

Rebased-from: 5d4f3a1f0cbdf52257b41ea09d175c0018ad9434
Litecoin: getworkex: CreateNewBlock() scriptPubKey argument instead of key
qt: GUI support for -disablewallet mode

Rebased-from: 8121047b20f6486bf049e642c3e6ca61682ffdd9
Add some additional logging to give extra network insight.
Coin Control Features for Bitcoin 0.8.5

* fix transaction timezone display bug in output selection
* excluding Bitcoin 0.9 changes for #3008 and #2945
* merged src/wallet.cpp for nMinimumInputValue (mininput)
Litecoin: Adjust Coin Control for 0.8.5 for Litecoin

Display the correct fee including the per output sub-CENT dust penalty.
Coin Control improvements October 25th, 2013

* code nits
 * introduced GUIUtil::setClipboard
 * calling getBalance(coinControl) now in walletmodel.cpp
 * replaced "WARNING" with "Warning"
 * added notr="true" to ui non translatable strings
Merge pull request #89 from pooler/more_logging

Add some additional logging to give extra network insight.
Fix comparison tool by asking for blocks more aggressively

Rebased-from: b33b9a6fefbe832bf45a6c7717d0537f27597bff
Fix uninitialized variable added in b33b9a6fe

After discussing with BlueMatt, this appears to be harmless in its
current state since it's always set before it's used. Initialize it
anyway for readability and future safety.

Rebased-from: 106f133de6bdb577c4135847fd703d08f525ba46
Update pnSeed array