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 know this is not your fault, but we already have code using names like credit, eligible and input when referring to txstore.Credit. We should standardise at some point, but I think for now we should at least not add yet another one, so I'd suggest renaming this to groupCreditsByAddr(credits []txstore.Credit, ...). What do you think?