Fix off-by-one error

The precondition check in rollBackLastOutput should make sure there are
two or more outputs in order to proceed.

Extended test checking the error path to zero and one output and
modified a test that had only one output in order to make it satisfy the
precondition.
Add and use specific error code to indicate precondition violations
Make precondition explicit in method comment
Refactor a bunch of our test helpers to make them more flexible

This also changes most of them use unique IDs for the DB entries they create,
meaning they can now be called multiple times in a single test.
Change some rollback tests to use real Credits instead of FakeCredits