Fix issue where function passed to assertXX was not deferred.

Only want it to be executed if within the global assert level.
Change wording of comments a little.
Avoid retention of connection object.