Add rollback last output functionality

Note that this does not include the transaction finalization which is
part of the rollback last output procedure in the opentransactions
wiki.
That's a good point, but ISTM we should be safe as long as we only
append to a given map entry the inputs added after the output was added.