Fix missing require in search_config.rb.
Update delete behaviour to match create behaviour.

In practice, it doesn't really matter whether they escape or not, since we
control the index names and the code that generates the rest of the index
name, so neither should contain any unsafe characters. However, they should at
least be self-consistent.
Add an existence check for Index objects.
Use the new index code in Rake tasks.

Some tasks, such as those to delete all items of a given format, have
gone too, as they haven't been used in some months.