MODE-2018 Upgraded MapDB to 0.9.11

Upgraded the MapDB dependency and fixed an apparent memory leak by moving the
BufferManager (used in the new query engine) to be owned by the session, ensuring
that it is garbage collected properly when the session is closed.

Also changed how the BufferManager allocates DB instances to be more lazy, since
MapDB 0.9.11 appears to have more overhead.
MODE-2184 Added a public 'close' method to QueryResult public API.