Enforce Pos_or_decl.t in reasons for decl types
Summary:
This is done by making Typing_reason.t a GADT with a phase type parameter, just like Typing_defs.ty, then redefining `ty` as:
```
<<<<<
type 'ph ty = Reason.t * 'ph ty_
=====
type 'ph ty = 'ph Reason.t * 'ph ty_
>>>>>
```
Reasons with a Pos.t are now `locl Typing_reason.t` while other reasons are just `'phase Typing_reason.t`.
This forbids `decl ty` to use a `locl Reason.t`, while `locl ty` is free to use any reason.
The rest of the changes is just to make the compiler happy.
Reviewed By: ljw1004
Differential Revision:
D26516301
fbshipit-source-id:
19a6956e78956e1a750fcc91ec26227483933ceb