Reserve only one network specific cached path per session
Remove CBaseChainParams::NetworkID()
Keep information about all block files in memory
SQUASHME: NetworkIdFromCommandLine() function instead of method
Parameterise command line option defaults, so translations are independent of them
SQUASHME: fix "Reserve only one network specific cached path per session"
Bugfix: Remove default from -zapwallettxes description (inaccurate)
Headers-first synchronization

Many changes:
* Do not use 'getblocks', but 'getheaders', and use it to build a headers tree.
* Blocks are fetched in parallel from all available outbound peers, using a
  limited moving window. When one peer stalls the movement of the window, it is
  disconnected.
* No more orphan blocks. At all. We only ever request a block for which we have
  verified the headers, and store it to disk immediately. This means that a
  disk-fill attack would require PoW.
* Require protocol version 31800 for every peer (released in december 2010).
* No more syncnode (we sync from everyone we can, though limited to 1 during
  initial *headers* sync).
* Introduce some extra named constants, comments and asserts.
RPC additions after headers-first
Remove CheckMinWork, as we always know all parent headers
Improve getheaders (sending) logging
Better logging of stalling
Add height to "Requesting block" debug
Rename setBlockIndexValid to setBlockIndexCandidates
Make -reindex cope with out-of-order blocks

Remember out-of-order block headers along with disk positions. This is
likely the simplest and least-impact way to make -reindex work with
headers first.

Based on top of #4468.
Skip reindexed blocks individually

Instead of skipping to the last reindexed block in each file (which could
jump over processed out-of-order blocks), just skip each already processed
block individually.
Fix rebuild-chainstate feature and improve its performance

Previous refactorings broke the ability to rebuild the chainstate by deleting the chainstate
directory, resulting in an incorrect "Incorrect or no genesis block found" error message. Fix
that.

Also, improve the performance of ActivateBestBlockStep by using the skiplist to only discover
a few potential blocks to connect at a time, instead of all blocks forever - as we likely bail
out after connecting a single one anyway.
Fix large reorgs
build: fix libtool's refusal to link static libs into a dll
boost: drop dependency on is_fundamental in serialization

There's only one case where a vector containing a fundamental type is
serialized all-at-once, unsigned char. Anything else would lead to
strange results.

Use a dummy argument to overload in that case.