Fix several cases where audit user would not be set immediately

- For any number of consecutive UPDATE/DELETE queries run immediately
  after changing the audit user (via `Thread.current[:current_user]`)
  that were executed via ActiveRecord's own save/update/delete API (not
  a raw `execute`), the audit user would not be recorded with the new
  value.
- For the first query immediately following changing the audit user (via
  `Thread.current[:current_user]`) the audit user would not be recorded
  with the new value.

Note that, as most ActiveRecord INSERT and UPDATE queries are wrapped in
a transaction, those queries are preceeded by a BEGIN, which will cause
them to be immune to this issue (when in fact wrapped in a transaction),
as the audit user is actually set immediately following the BEGIN query,
and thus is set to the correct value for the actual INSERT/UPDATE.
Fix incorrect ENV variable names for test suite version changing