Java async close

Java close cleanups (for connection/session/cursor) now occur as part of a typemap to ensure that they occur when the call to 'close' has completed.  This fixes #1332.