SERVER-8758 : make IndexSet a set rather than a vector
SERVER-8758 - don't go past StringData end since it might not be null terminated
            - fix $ handling in middle of string
SERVER-8758 - IndexSet fix for ab vs a