Fix the still-unfolding disaster that is search indexing at the moment.

Restore some of the index-on-create/update/delete stuff, but this is
not yet integrated into the description create/update/delete stuff.
Patch the indexing func so it more or less works when we update
descriptions, though there's still a problem when descriptions are
deleted and remain in the index. Better solutions required all round.
Move more templates to core
Start trying to genericise the search infrastructure by moving
various bits to core.
More genericization