Ticket 49435 - Fix NS race condition on loaded test systems
Bug Description: During a test run, on a heavily loaded systems
some events would time out before they could occur correctly.
Fix Description: Change the structure of events to mitigate
a deref performance hit, and add a ns_job_wait conditional
that allows blocking on a job to complete so that tests do not
require time based checks.
Review by: mreynolds (Thanks!)
(cherry picked from commit 11974a08f7bb083a48590cdc26652934fa74c0cb)