Merge branch 'master' of https://github.com/rejectedsoftware/vibe.d
fix broken keepAlive timeout

problem with calling `empty` is that in the libevent driver implementation of `empty` checks `leastSize` and `leastSize` is blocking without a timeout. this in turn renders the keepAlive timeout useless.
Merge pull request #597 from Extrawurst/patch-1

fix broken keepAlive timeout
Move the client disconnect message in the HTTP server after the waitForData call. See #597.

Previously, the log message would indicate that a connection timed out, even if the client actively disconnected during the keep-alive period.
Compile fix.
Fix possible assertion during active TCP connects and a possible connection leak.

- Sometimes `bufferevent_socket_connect` will invoke the `onSocketEvent` callback synchronously instead of using the event loop. The resumeTask failed in this case. See also http://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/thread/14474/

- When an `Error` (vs. an `Exception`) was thrown within an incoming TCP connection handler, the connection wasn't actively closed, possibly resulting in a permanent socket leak
Merge branch 'master' of https://github.com/rejectedsoftware/vibe.d