Move CMerkleTx to wallet.cpp/h

It is only used by the wallet so it has no place in main.

That's what I meant above. It returns `-1` for blocks that are not on the main chain. This used to be `0` before the wallet conflict changes in 0.9. It looks like this inadvertently changed, with no one realizing that the CMerkleTx was used here.