fix compilation under FreeBSD
Merge pull request #329 from abimaelmartell/fix/freebsd-compilation

fix compilation under FreeBSD
moved to net_skeleton
merge
Embedded net_skeleton
PF_INET -> AF_INET, unbreaks FreeBSD
open_cgi_endpoint() strrchr fix
Setting last_io_time in ns_add_sock()
Added conditional for handling idle websocket conns
Added missing signal.h
Moved unit_test.c to examples
Guarded on_cgi_data() call by ifdef, thanks to Pavel Pimenov
squashed warning in read_from_socket
re-added signal.h
Win32 build fix
Fixed problem with mg_printf_data()
add_to_set(): fix around non-negative SOCKET on Windows
Added time.h
Restored jni build dir for Android
Clearing flags in close_local_endpoint()