Log slow queries

This branch introduces the ability to log slow queries.  Slow queries can be defined by an absolute limit (`QUERY_INSPECT_ABSOLUTE_LIMIT`) or by a number of standard deviations above the mean (`QUERY_INSPECT_STANDARD_DEVIATION_LIMIT`)