Changed type argument of testreport_add from type constant to reified
type

This also passes ADT and grammar definitions to the test framework and
allows, for instance, to generate random values for ADTs.
Fixed non-linear set patterns

In the rare cases where set patterns contain duplicate variables, they
are now handled properly.

- duplicate variable patterns are removed.
- all literal patterns are separated
- all other patterns are compiled in order
- if the last pattern is a multi-variable it is treated specially.

There is an unused optimization here: 
if the last multi-var in the pattern is followed by other patterns
AND these patterns do not refer to that variable, then the multi-var
can be moved to the end of the pattern.
Added missing newline to message