Preliminary auto-build using waf
Finalizing tests and test running (./waf rununittest).  Several test cases are disabled due to non-portability of SOCK_NONBLOCK