Fix for pattern vars in transforms

We'll need this when making rewrite rules for partially evaluating type
class dictionaries.
Partial evaluator fixes

Need to identify when a specialisation has made no progress, so we don't
treat it as a specialisable application. Also fixes tranform rules.

With this it turns out to be safe (if not yet useful) to mark type class
dictionaries as 'static', but without further work on the partial
evaluator this isn't going to help much yet, so it's not enabled yet.
Merge pull request #1623 from edwinb/patvars

Fix for pattern vars in transforms
Merge branch 'master' of git://github.com/idris-lang/Idris-dev