[FEATURE] Ability to check if a connection has been closed

Is your feature request related to a problem? Please describe.

Currently, checking whether a connection has been closed requires a workaround such as issuing a getinfo(...) request and intercepting an InterfaceError if the connection has been closed.

Describe the solution you'd like

Ideally, it would be possible to directly check if a connection has been closed, e.g. through a property closed.

Describe alternatives you've considered

Alternatives considered:

  • issuing a getinfo(...) request and intercepting InterfaceError
  • attempting to create a cursor and intercepting InterfaceError