mining: Stop transactions losing their dependants.
mining: Stop transactions losing their dependants.

This fixes a bug where a transaction would lose reference to other
transactions dependant on it when being considered for inclusion in a
new block template. The issue only occurs when the transaction being
considered triggers a change of priority queue ordering to ordering by
fee. It results in none of the dependant transactions being considered
for inclusion in the new block template.

decred/dcrd,decred/dcrd,jrick/dcrd,jrick/dcrd