Avoid duplicated type variables

When collecting type variables, handle them as sets, not lists. This
might not make things faster, but it does make debug output clearer.
Add TODO on bug
Document simple manual testcases (WIP)
Whitespace fixes in cabal file