Set nSequenceId when a block is fully linked
Set nSequenceId when a block is fully linked

Also adds a test to CheckBlockIndex

wastholm/bitcoin,wastholm/bitcoin,wastholm/bitcoin,wastholm/bitcoin,wastholm/bitcoin,wastholm/bitcoin