Fix old glibc lack of endianness functions

Also add WS_NONBLOCK flag for nonblocking libevent
Add new function libwebsock_init_flags

This function is for passing libevent flags to event_base_loop.

libwebsock_init now calls libwebsock_init_flags(ctx, 0);
Allows non-blocking operation of libwebsock_wait if
WS_NONBLOCK flag is set in libwebsock_init_flags