will not crash the VM on use. ref #485
Uses the event callback for close to give notification on close
of a handle. For explicit calls to close(), we set the SWIG 'this'
attribute on the containing object to None.
On uses of a handle as an input argument, we check to see if it is
None, or if its 'this' attribute is None, and issue the
appropriate exception.
Includes a set of test cases that parallel Java test cases for the same.