The code in avrorouter that returned the current transaction was not very
useful and it can be acquired via the REST API in a more convenient
format.
The number of created sessions is tracked on the service level so there is
no need to track it in the avrorouter.
Removed declarations for functions that do not exist and moved code around
to reduce the scope.