Added a deferred string formatting option to the logstate method and mod...

When testing with semi-large result sets, we observed prolonged periods of heavy CPU utilization and traced it down to this call in clear_job. Since the string formatting occurs prior to the logstate method call, the object stringification penalty is incurred even when "debugging" is disabled. For large results, the stringification process can add up to several seconds or more.

This optimization lets us defer the costly string formatting until after we determine that "debugging" is enabled. It should result in a nice performance increase for anyone working with large result sets, with no loss of functionality.