Fix locking bug in nn_global_submit_statistics()

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>
Merge pull request #346 from bnewbold/master

Fix locking bug in nn_global_submit_statistics()