compat: enable building for solaris on sparc using GCC

MEMCACHED_PATH=/opt/csw/bin/memcached \
    gmake CC=gcc WITHOUT_ASYNCNS=1
compat: enable building on OS X

OS X lacks some Linux (and recent POSIX) specific functionality; implement
the required OS X equivalents in compat.h and add OS X Makefile rules in
compat.mk.

In the Python CFFI wrapper, load the .dylib module on darwin.