Fix the list_indices and migrate_index rake tasks

These were broken because the local variable ``logger`` was being set in the
Rakefile, so weren't accessible to these tasks which were moved to a separate
file.

Example of the error:
```
    rake aborted!
    undefined local variable or method `logger' for main:Object
```