Show executing SQL statement in long-running query log message

Also fix typo ("progess" -> "progress").  Refactor unit test, and add unit test coverage for log message.
My thinking was that callers of this method know from context whether they are requesting info on a fragment in an ad hoc query, and in that case, they would not call this method.  I thought it would be better to fail early with an assertion, rather than have to trace backwards from a `NullPointerException` that happens later on.