Fix race condition parsing beam monitor packets

There was a race condition handling the beam monitor packets because we
weren't locking the mutex before acquiring a pointer to the monitor
workspace.  Fixed by locking the mutex earlier.

Refs #9657
Merge remote branch 'origin/bugfix/9657_beam_monitor_race'