Allow negative balance

Reopening #2389 as a way to address #1511, because of #2417.
@whit537 Yeah this one is tricky. It's because I wanted to keep the `assert` below so I had to distinguish between a negative balance, and `pending` being `NULL`. When the balance would become negative the additional condition `balance >= %(amount)s` makes the query return zero rows, and thus the `.one()` method returns its default value, which we set to `False`.