Refactor all external index tracking into OtherIndex class

Change-Id: I5102f8ffd321ea1e3ff989b8e5861618f018271f
Merge "Refactor all external index tracking into OtherIndex class"