Obly remove an index when defined.

When upgrading horde from an old version, migrations
can fail when trying to remove a non existing index.

That commit check if the index is defined before
removing it.