Fixed dropInstances sometimes corrupting the database (Issue #11). This
was due to index.clear() not marking the root page as dirty.