event.c: Add assert for adding invalid time event

Adding a time event with a frequency of 0 ms is very bad. Add an assert
for this.
endpoint.c: Don't send 'pong' if on_ping set

Users of on_ping will have to send the 'pong' themselves to conform with
the RFC. This enables easier testing for heartbeat timeouts.
test_client.c: Tests for server timeouts

Add a 'timeout' mode to the test client to make it easier to test
heartbeat and handshake timeouts.
iloop: Add support for 3rd party event loops

All event loop operations in the server are now done through an 'iloop'
object, which represents an interface to an event loop.  This allows any
event loop implementation to be used by the server (the client doesn't
use any event loop so already had this property).

Using 'server_create' and 'server_listen' as an interface has not
changed. However, the server now has 'server_create_detached' which will
create a server object without any event loop implementation attached.
An 'attachment' function (such as iloop_attach_libevent) must be called
on the server's iloop object before using the server.

This change adds two implementation for iloop, one for the built in
'event' loop and one for third party 'libevent'.

The echoserver can be built with support for testing libevent, by
building the target 'echoserver_all'. This target will is for building the
echoserver with all supported event loops (currently only libevent).