Revert "net: don't clear all errors on close"
Revert "net: don't clear all errors on close"

You're supposed to clear the error queue before any I/O operations. Per
SSL_get_error(3) man page.

This reverts commit ee3ed37300743addb1344e39bc46d3cd2b89a718.

dom96/Nim,dom96/Nim,dom96/Nim,dom96/Nim,dom96/Nim,dom96/Nim,dom96/Nim