Discard the reference to the underlying buffer during close(), and throw ClosedDatabaseException on subsequent database access.

Currently clients can continue to access the database even after it has been closed. This prevents that, and should also help ensure the underlying database is garbage collected.