Implement connection.isConnected(), don't segfault when doing work on closed connection

...osed connection

We need to be able to detect closed connections so that we can more easily integrate with generic-pool.  That module
has a validate() hook which pairs nicely with the connection.isConnected() change I'm proposing here.

Test scenario for reproing segfault issue:
* Open connection
* Set timer for closing connection with connection.close() after 10 seconds
* Wait for timer to activate and close connection
* Try to run connection.execute('SELECT 1 FROM DUAL')
* Segfault occurs
* After this change, it will throw an error instead of segfaulting