Add CaughtUp() function (needed by later commits)
Add nLastDataPos
Rearrange ProcessMessages
Don't request blocks when block invs received unless it's the syncnode, or we've CaughtUp()
Force selection of a new syncnode since the current syncnode is about to stop sending blocks.
Replacement stalled block logic. Depending on the situation, it will either disconnect
the peer (as previous behaviour), or it will reselect a syncnode (e.g. when 500 blocks
have been received from the syncnode).
Rename MarkBlockAsReceived to MarkBlockAsRequested to reduce confusion.