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.
Why not make an explicit check function? I'm having a really hard time understanding what we are testing here.