Fixing improper input syntax and failing bounds check
Use actually valid transactions for script tests
Add actual signature tests
Grammar fixes in README

Github-Pull: #4956
Fixing out of bounds error in GetKey()
Merge pull request #4962

6f3ae9b Fixing out of bounds error in GetKey() (ENikS)
Merge pull request #4949

c8589bf Add actual signature tests (Pieter Wuille)
76ec867 Use actually valid transactions for script tests (Pieter Wuille)
Merge pull request #4955

87314c1 Fixing improper input syntax and failing bounds check (ENikS)
Do merkle root and txid duplicates check simultaneously

Move the txid duplicates check into BuildMerkleTree, where it can be done
much more efficiently (without needing to build a full txid set to detect
duplicates).

The previous version (using the std::set<uint256> to detect duplicates) was
also slightly too weak. A block mined with actual duplicate transactions
(which is invalid, due to the inputs of the duplicated transactions being
seen as double spends) would trigger the duplicates logic, resulting in the
block not being stored on disk, and rerequested. This change fixes that by
only triggering in the case of duplicated transactions that can actually
result in an identical merkle root.
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.

This breaks reindexing, which cannot yet deal with out-of-order blocks on disk.
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