Fix some "strange situations" in the upcoming fork.

Include some more checks that prevent "strange situations" (which I consider buggy, see also the corresponding pull requests to Namecoin) in the upcoming fork.  All of them are unlikely to occur anyway (unless someone uses a custom client), but should be fixed.  Also, include the block height into the coinbase (BIP 30) to prevent non-unique, unspendable coinbase transactions.