Move MockTermIndex to separate file

Change-Id: I776fe2abdfb79f53ff49bfa3ee2930b678bde41d