Compile with -pthread and fix _POSIX_C_SOURCE define
Get stuff building under tup
Move event.h to fix circular deps
Update rest of demos to tup, polish up build files