LoggingProfiler for writing queries profiling info to logger

LoggingProfiler extends original Profiler and writes queries profiling info to logger. This can be useful for debugging queries in cli mode - I added usage example how I use it.