Corrected handle cleanup behavior.

Handles were only freed properly if SQLFreeHandle was called, but not if SQLFreeEnv, SQLFreeConnect
or SQLFreeStmt were called.  Handles are now cleaned up reliably elsewhere.