Index is now parameterized and a Monoid

Index a is parameterized over the contents of the set indexed by the
trigram. It is also a Monoid. Yay.