Fix locking bug in nn_global_submit_statistics()

Notes on this pull:

I couldn't immediately find a style guide or pointers on how to submit patches, please let me know if I need to do anything special. I'll probably send an email to the mailing list pointing to this pull request.

I'm baffled as to how the existing code would not result in a locked condition and broken code on all platforms (instead of just on OSX), so I might be missing something with this patch.

------------------

nn_global_submit_statistics() had a locking bug where a nn_glock_lock()
does not always get nn_glock_unlocked().

This appears to fix issue #341 ("SUB fails after ~tens of seconds on OSX
10.10 (Yosemite)") in which socket communication fails after 10 seconds
on OSX. nn_global_submit_statistics() is called every 10 seconds by
default.

Signed-off-by: bryan newbold <bnewbold@twinleaf.com>