Simulate Python's `with` statement in JS.

Passing a function to the assertXX function, e.g. assertWhenOwnColl,
will cause it to get evaluated. The deferred evalulation allows
workloads to be defined without having if-guards essentially double-
checking the result of the asserts.

Note that an explicit return in the passed function is not necessary,
as it will implicitly return true.
Avoid having any stack traces omitted from the logs.