Handle SSL WANT_READ/WANT_WRITE exceptions and drain SSL buffer.

SSL has in internal read buffer that needs to be drained. Since
we, by default, read in 4K chunks, anything larger would have left
data to be read that may not have been processed properly.

Also, we need to handle SSL_ERROR_WANT_READ and SSL_ERROR_WANT_WRITE
exceptions around the recv() and send() calls, otherwise we would
think we are disconnected and cause all sorts of problems.
Do not attempt to register connections not yet established

When using multiple job servers, some connections may not yet be
established (not been chosen yet), so their socket is still invalid.
This would cause poller.register() to throw an exception.
Merge pull request #46 from Shrews/fix_ssl_recv

Address some SSL handling issues.
Revert "Gearman tweaks to fix bug"

This reverts commit 2ea5ca7f145c6bd7a083305abb98bdc802733479.
Merge branch 'upstream/master'
Prioritize connection writes over reads
Merge pull request #1 from lifechurch/km/read_deadlocks

Handle read deadlocks