SSL error queue fix

Errors were not getting cleared from the queue between various OpenSSL
function calls. This was causing the error queue to contain misleading
information on subsequent calls to `SSL_get_error`.

One degenerate case was incorrect dispatching of errors after a failed
`SSL_read`. Conditions that simply should have lead to another call to
`SSL_read` were being treated as fatal. This was verified while stracing a
stud process and seeing `read()` return with `EAGAIN` and stud immediately
closing the socket fd and logging an `SSL_read` error.