Transaction scheduler

In this commit a scheduler with a maximum concurrency level of 1 per
request controls every query done within a transaction.
Merge branch 'transactions' into aggregatewithoutgenericnode