Bugfix: fix race conditions as reported by Go

There are reports of l2met processes blocking on a
syscall to FUTEX. These reports motivated me to
use Go's race condition checker to ensure there was
nothing obviously wrong. It turns out there were a few
race conditions around the receiver's register. Those have
been fixed and along the way I improved the receiver's wait
function. This should fix the unreliability of the integration
tests.