wtxmgr: refactor common code within insertMinedTx
wtxmgr: refactor common code within insertMinedTx

In this commit, we remove most of the common code between insertMinedTx
and moveMinedTx. Now, all the common logic is handled within
insertMinedTx, and moveMinedTx only contains its unique logic.

btcsuite/btcwallet,btcsuite/btcwallet