add test case for in operator on object database.
Fixed bug on reopening db with dirty indexes

Now dirty indexes are removed to avoid the db is unusable