Implemented logging functionality

As requested during the hangout talk here a proposal how to enable logging. I have to admit I am not sure if it covers all places but it appears to be. I have chosen for the option named `enableQueryLogging` as I think this is clear what it does.

Next, should we use console.log() or some other approach. What do you guys think?