When typechecking a pattern synonym, the typechecking the definition of the wrapper
can be deferred until after everything else is checked (since the
expression-type of the pattern synonym can be determined without looking
at the wrapper).

This is needed so that something like this typechecks, without regarding it
as a recursive pattern synonym:

pattern P x <- (x:_) where
  P x = foo [x]

foo (P x) = [x, x]
Add test case for explicitly-bidirectional pattern synonym