Fix bug in event.c

If a time event removed itself in its callback() function, the program
would crash.  Make sure to handle this properly.
Get server_stop working properly

server_stop now works properly, and is safe to call from signal
handlers. All clients will be sent a close frame before closing the
socket. echoserver now calls server_stop in its signal handlers. Set
wait time to something more sane in test_event.c