Introduce IsGhcPass; refactor wrappers.
Commit message:
Introduce IsGhcPass; refactor wrappers.
There are two main payloads of this patch:
1. This introduces IsGhcPass, which allows e.g. printing
code to ask what pass it is running in (Renamed vs
Typechecked) and thus print extension fields.
2. This moves the HsWrap constructor into an extension
field, where it rightly belongs. This is done for
HsExpr and HsCmd, but not for HsPat, which is left
as an exercise for the reader.
This patch subsumes !1721 (sorry @chreekat).
This is a rebirth of !1957 (closed), which was more ambitious.