This PR rewrites the implementation of the BnB coinselection algorithm to skip the duplicate evaluation of previously visited input selections.
In the original implementation of BnB, the state of the search is backtracked by explicitly walking back to the omission branch and then testing again. This retests an equivalent candidate set as before, e.g., after backtracking from {ABC}, it would evaluate {AB_}, before trying {AB_D}, but {AB_} is equivalent to {AB} which was tested before.
CoinGrinder tracks the state of the search instead by remembering which UTXO was last added and explicitly shifting from that UTXO directly to the next, so after {ABC}, it will immediately move on to {AB_D}. We replicate this approach here.
As fewer nodes are visited, this approach will enumerate more possible combinations than the original implementation given the same limit for iterations.