Semaphore is used for waiting for socket termination instead of efd

Efd is a rather expensive object (depending on the platform).
Semaphore is cheaper. At the same time is is interruptible by
SIGINT (unlike condition variable).

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Merge branch 'master' of https://github.com/250bpm/nanomsg
Timeout in inproc test extended

I've seen this timeout expire on out Solaris build box (erzika).
Doubling the value should help.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
nn_close() can be interrupted by signal

Blocking nn_close() can now return EINTR error and can
be re-started afterwards.

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