Add test cases and documentation for the nolock and immutable query
parameters.
Fix nolock and immutable so that they work even if READONLY is requested.