Check whether the database or prepared statements have been closed
Check whether the database or prepared statements have been closed

This is a partial fix for https://bitbucket.org/xerial/sqlite-jdbc/issues/122/

The JVM does not crash anymore because of the native code,
but the Java code is still not thread-safe.

xerial/sqlite-jdbc,paramvir-b/sqlite-jdbc,xerial/sqlite-jdbc,paramvir-b/sqlite-jdbc,xerial/sqlite-jdbc,paramvir-b/sqlite-jdbc,paramvir-b/sqlite-jdbc,xerial/sqlite-jdbc