Revert "Litecoin: Remove native coin generation."

This reverts commit 94bf538131a5eb5c837044b14789a29981b7e0e6.

Conflicts:
	src/init.cpp
Litecoin: s/BitcoinMiner/LitecoinMiner/ and detect scrypt implementation
RPC: add getbestblockhash, to return tip of best chain
Pass check level, check depth to VerifyDB()
RPC: add 'verifychain', to verify chain database at runtime
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