Go indexer: Make metadata rule application less quadratic.
Go indexer: Make metadata rule application less quadratic.

Summary:
Previously rules were found by walking through all the rules for a given file
for each candidate anchor. This change gets rid of that, organizing rules by
their starting point so that the lookup is only among rules with that same
starting point in the file. That will usually be at most 1, or in any case a
small value.

Reviewers: #core_team, zarko

Reviewed By: #core_team, zarko

Subscribers: #core_team

Differential Revision: https://phabricator-dot-kythe-repo.appspot.com/D1614

kythe/kythe,benjyw/kythe,legrosbuffle/kythe,kythe/kythe,bzz/kythe,kythe/kythe,kythe/kythe,legrosbuffle/kythe,benjyw/kythe,bzz/kythe,legrosbuffle/kythe,bzz/kythe,benjyw/kythe,benjyw/kythe,bzz/kythe,legrosbuffle/kythe,legrosbuffle/kythe,kythe/kythe,benjyw/kythe,bzz/kythe,bzz/kythe,bzz/kythe,benjyw/kythe,legrosbuffle/kythe,bzz/kythe,legrosbuffle/kythe,legrosbuffle/kythe,legrosbuffle/kythe,kythe/kythe,benjyw/kythe,legrosbuffle/kythe,bzz/kythe,benjyw/kythe,bzz/kythe,bzz/kythe,kythe/kythe,benjyw/kythe,legrosbuffle/kythe,kythe/kythe,kythe/kythe,kythe/kythe,benjyw/kythe,benjyw/kythe,kythe/kythe,benjyw/kythe,bzz/kythe