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.
Ok, good to know they use the is prefix for boolen functions.

As for the isEligible signature making it clear it's about the credit,
I'd totally agree with you if it was a function, in which case I'd
immediately look at the arguments to infer what is (or not) supposed to
be eligible, but since this is a method I expect it to apply to the type
it sits on, with the arguments being just extra stuff it needs to do its
job.  It's not a big deal, but I thought it'd be worthwhile to explain
my thinking on this.