Indexing service bugs

- Empty task intervals, and empty lock intervals, aren't useful.
- Break up segment actions into smallish sets of segments.
- Work around SELECT -> INSERT races when adding segments.