send and recv functions now return EINTR in case signal was caught

This functionality is important for language bindings and applications
that set their own signal handler which just records the fact that Ctrl+C
was pressed and wait till the library exits with EINTR before actually
terminating the process.

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