More flexible type class instances (on functions)

Supports this sort of thing:

  instance Functor (\x => Int -> x) where
    map f intf = \x => f (intf x)

  instance Applicative (\x => Int -> x) where
    pure v = \x => v
    (<$>) f a = \x => f x (a x)

  instance Monad (\x => Int -> x) where
    f >>= k = \x => k (f x) x