wrap modify_index in a transaction

If we failed to add an object it could leave the view in an inconsistent
state which caused the whole process transaction to fail.
Merge pull request #74 from nnutter/search_queue