zsys.c fixes for windows and for non-android build breaks
Merge pull request #505 from evoskuil/master

zsys.c fixes for windows and for non-android build breaks
On 64-bit Windows, ssize_t is long long

Fixes #502
Fixed signed/unsigned comparison

Fixes #503, though not tested on Windows.
Fixed inconsistent use of S_IFDIR et al

* If S_ISDIR, S_ISREG not defined by compiler, czmq_prelude.h now
  defines them.

* zfile_is_directory and zfile_is_regular now use these macros.

* CZMQ now uses POSIX S_IRUSR and S_IWUSR instead of sometimes
  S_IREAD and S_IWRITE, and defines the S_IRUSR and S_IWUSR macros
  if they're needed.

Fixes #504
Problem: zmq_socket returns void *, not zsock_t

zsys_socket was inconsistently using socket and handle, the code
would not build on ZMQ v2 for example. Since 'socket' is dangerous
to use (it silently resolves to the library function if there's no
variable in scope), I've switched to using 'handle' in this code.

Also, the socket configuration API is zsocket_set_xxx, which may be
replaced by direct calls to libzmq when we deprecate zsockopt.c.