zmq_compat test added, couple of bugs in ZMQ compatibility fixed

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
zmq_setsockopt tested in zmq_compat unit test

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
max number of NN sockets is a compile-time value

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
sp_socket() now executes in O(1) time wrt max possible number of sockets

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Allocate socket table and unused socket table in one go

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>