Improve reliability of Connection methods

* Improve reliability of Connection.is_alive(): now returns True/False instead
  of raising an exception if connection is already closed.
* Improve reliability of Connection.close(): now returns immediately instead of
  raising an exception if connection is already closed.