Implement splitLastOutput and hook it with the case where we don't have enough inputs and have to split an output and fulfil just part of it.

The other case where we need to split an output is when the tx is too big, and that's coming in my next PR.
Oh, I guess this is what you mentioned in your comment, that it's coming in the next PR.