ZeroMQ max sockets and mutexes.

Increase the ZeroMQ max sockets limit.
Add mutexes around critical sections.

Change-Id: Ic898cd58b3978eb6cf20bfded5683e9e835fa512