Correctly close SQLite Database

- In the android SQLite database wrapper the close method only closes when the thread calling close is the thread that created the database.
- For JavaSE behaviour is unchanged. Each thread closes connection to the db
- IndexManagerIndexTest now uses datastore.close() to close the db
I guess the logic here is 'pretend you were closed if the user closed from another thread, or if you're really closed'? I suppose that makes sense, am I right?