Report source of db closure

If a database is closed directly, record the caller as a stack.
Include the caller in the exception that is thrown when an operation
is attempted on a closed database.  If the exception percolates up to
the framework, the framework will log the exception and its cause.

This covers the common case of a database being closed because
corruption was detected.  It makes it easier for triage to understand
why the database was closed unexpectedly.

Test: atest
 * FrameworksCoreTests:android.database
 * CtsDatabaseTestCases

Flag: EXEMPT bugfix
Bug: 338297108
Change-Id: Id9bf31177881644922f31d2a353aafd1aab2823e
4 files changed