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.
I guess the comment needs to be updated as I don't see expNoAddrs here. Also, it took me quite a while to figure out what expNoEligibleInputs means, as it seems to use two abbreviations and the second one is an actual word, which made me think of inputs that are not eligible