Partial and machineless

Changes include:
* `PostgresInterface` interface changed :),
* server now understands partial transactions and bills,
* in case of machine going offline server automatically sends tx after `SESSION_TIMEOUT `.


I think we need to simplify the logic here, especially because we have to make sure there are no race conditions. I believe there are three possibilities:

1. We've received a complete tx from the machine with no timeout. Send full amount of bitcoins and disregard bills. Insert complete transaction.
2. We've timed out without receiving a complete tx. There should be no previous bitcoin sends. Pull the last bill record and send a partial transaction. Insert partial transaction.
3. After timeout, we finally receive the complete tx from the machine. Pull the previous partial transaction (if any) and deduct it from the complete tx, and send those remaining coins. Insert complete transaction.

We can avoid race conditions by inserting complete transactions in (1) and (3) and the single partial transaction (there can only be one) in (2). Inserts must happen before the actual bitcoin send.

In (2) and (3) we have to handle the case where the partial tx is happening at the same time as the complete tx, so the complete tx code might not be aware of the partial send and won't correctly deduct the coins. 

For (2), the code should check for existence of complete tx and insert partial tx in an atomic transaction. If complete tx exists, no partial tx should be inserted.

For (3) pulling partial tx and inserting complete tx should be done as an atomic transaction.

This way:

1. If (2) inserts a partial tx record, then when (3) tries inserting the complete tx it will find the partial tx.
2. If (3) inserts a complete tx, (2) will see this and won't execute the partial tx.

Also, we can wrap (1) into (3), since it's the same thing as far as the db txs are concerned. In both cases we atomically pull the partial tx while inserting the complete tx. There either is a partial or isn't.

@chester1000 What do you think? I couldn't come up with a way to do this without atomic transactions that would be simpler, but I haven't given it that much thought.