smarter exhaustive match checker

generalises is_var to is_unconditional, and responds to unconditional
patterns anywhere rather than just at the end. the new exhaustive
heuristic can be summarised as: contains an unconditonal pattern, or
else consists of constructors applied to unconditional patterns where
every constructor appears at least once.

a further improvement (not implemented) might be to consider a
constructor applied to unconditional arguments as unconditional if it is
the lone constructor of its type. (this is currently only done for
tuples.)