Fields for transaction and register in User

User model definition moved again (!) so it can refer to the Transaction
model.

Also a couple of fixes to format strings in PL/pgSQL exceptions.
Teleporting of transactions between terminals

The register now understands users, and can teleport the user's current
transaction to wherever they are working.

Most of the complexity is in tidying up when a user leaves a terminal
unattended but logged in and starts work somewhere else.