Partial evaluation improvements

Now making specialised definitions which look under pattern matches, not just top level.
As a result, partial evaluation now works better when higher order arguments are marked [static], and when type class dictionaries are marked [static] (which currently still has to be hard coded in, but we're getting there...).