Make the UseJOTMAsTxManagerIT and the TestReadOnlyServer tests green

Also, we now allow ReadOnlyDatabaseProxy, when used through the shell,
to start transactions.

Also did some general clean-up in various places.