Do txid duplicates check inside BuildMerkleRoot

Move the txid duplicates check into BuildMerkleTree (where it can be done without building a full txid set), and rename the method to CalculateMerkleTree.
Shouldn't this be `vMerkleTree[j+i] == vMerkleTree[j+i2]` as below in the hashing?