Generalize 'TextKeyProxyIndex' to 'KeyProxyIndex' for any type

- introduces the 'Bijection' typeclass
  - the comments in Bijection show an instance to infer
    'Bijection b a' from 'Bijection a b', but this requires
    XFlexibleInstances and XUndecidableInstances.
    This leads to errors on runtime if not handled correctly.