Set and get atomic integer atomically.

Defer GinkgoRecover to ensure an assertion failure in a goroutine causes testcase failure.
Merge pull request #7 from glyn/measurements-improvements

Set and get atomic integer atomically.