Fix race condition in doCheck.
Fix race condition in doCheck.

sm1() and se1() have different source IP addresses.  It's possible that
that between ch.DispatchMetrics and ch.DispatchEvent, the pending items
are flushed which results in ch.DispatchEvent triggering another lookup
and causing the assert to fail (because Invocations() == 2).

atlassian/gostatsd,atlassian/gostatsd