Improvements to comments.  Store some extra information in SqliteThread that
is useful for debugging.