Added TraceLogger to get backtrace for executed queries

Added a TraceLogger that returns a backtrace for the executed query.
The backtrace returns the last 10 frames, and it also formats the frames for easy reading
I know I'm being a bit too sarcastic here, but that's really kinda messed up :-\