Make CScriptNum() take nMaxNumSize as an argument

While the existing numeric opcodes are all limited to 4-byte bignum
arguments, new opcodes will need different limits.
Replace NOP2 with CHECKLOCKTIMEVERIFY

<nLockTime> CHECKLOCKTIMEVERIFY -> <nLockTime>

Fails if tx.nLockTime < nLockTime, allowing the funds in a txout to be
locked until some block height or block time in the future is reached.

Only the logic and unittests are implemented; this commit does not have
any actual soft-fork logic in it.

Credit goes to Gregory Maxwell for the suggestion of comparing the
argument against the transaction nLockTime rather than the current
time/blockheight directly.
Enable block nVersion=3 CHECKLOCKTIMEVERIFY upgrade process
Hack because LOCKTIME_THRESHOLD was moved to main.h
Hack around removed CTransaction from EvalScript etc.

Caused by bitcoin/bitcoin 4890 breaks CHECKLOCKTIMEVERIFY
because there is no longer access to toTx for some strange reason