Add getter mode for logQueries.

This is useful if you want to know whether or not a connection is  currently logging queries. The actual use case for this will be in DebugKit where I need to know whether a connection already has logging enabled so I can enable it and get the existing logger or not.