For fiddling with id allocation

- in update_index(), build the new index first, then assign to
self.index in one swell foop
- dup.visit() should visit itself, but set the dup’s item_id to null
anyway to be sure
Merge pull request #230 from urbanairship/duplicate-ids

For fiddling with id allocation