Fixed bug where SSL.sslfile.close could block for nonclean (normal) close on
the client side.
The problem was that close() could do a blocking wait for a remote close
packet or socket close, which it should only do if a "clean" close is
requested. Note that this only happened for close in blocking mode, so the
bug was not that serious.
Also made the handling of clean closes in nonblocking mode more consistent,
which meant some slight changes in the semantics for shutdown() and