With the current order, when using MongoDB, the indexes are created on
connection, but clear() drop the database with the indexes just after,
meaning we have no indexes! Let's fix that by upgrading (so we're sure we
have tables or the like), then clearing data, then upgrading again so we're
sure we have our tables or indexes.
Change-Id: Ib3550f26ac0507c781a5e82573a789b2513ae04c