Move implementation of some CBlockLocator methods

Move out of main.h to improve compile times and add documentation
for what the methods do.
Introduce a CChainParameters singleton class and regtest mode.

The new class is accessed via the Params() method and holds
most things that vary between main, test and regtest networks.
The regtest mode has two purposes, one is to run the
bitcoind/bitcoinj comparison tool which compares two separate
implementations of the Bitcoin protocol looking for divergence.

The other is that when run, you get a local node which can mine
a single block instantly, which is highly convenient for testing
apps during development as there's no need to wait 10 minutes for
a block on the testnet.
Merge pull request #2632 from mikehearn/chainparams

Refactor chain-specific tweaks into a CChainParams class and introduce a regtest mode