This commit consists of two things.
1. server.go will now set two variables for the current transaction, the
username and request id. These are transaction local and therefore do
not leak into the connection.
2. The initial schema received a history table and a trigger. This
trigger writes changes into the history table. When inserting records
the function will pull the transaction local variables and add them
to the record.
The trigger is added to all tables, so that a complete changelog is
created.
These changes serve as the basis for further features. One is the
searching for changes on specific resources (think history rr, history
zone, ...).
The other feature is a way to subscribe to changes in the database based
on filters. This will be the way to implement the output feature of dim.
These helpers enable the parameter parsing into method specific structs.
As the parameter list is an array, the order of arguments is important.
Sadly type checks can be done at runtime, because all parameters are
converted to a list of interface{}. So if there is an error, it will
only result in an error at runtime, so be careful.
This adds the transaction handling to the connection and context
handling.
It will raise an error and inform the client if anything is going wrong
with the transaction.