Input selection algorithm

Rebased to vp-withdrawal.

Note I had to make some minor changes to make the test run again.

Also the createInputs and createInputsStore needs to be cleaned up. They are both taking a store right now and especially the createInputsStore name is misleading.
Because I think txid is a better name than TxSha, which I think is quite a bad name. Your point about being consistent with the rest of the code is valid, though.