simplify Typing_union
Summary:
There is some redundancy in the treatment of null, options, unions and intersections in Typing_union, which appear both in `union_` and `union_lists`. This diff makes `union` call directly into `union_list` so as to get rid of the cases in `union_` dealing with null, options, unions, intersections.
We however then need to simplify away nonnull when the result is nullable, which is done in `make_union`. See doc comments for more details.
We also get rid of exception `Not_equiv` to replace it with returning an option.
Reviewed By: andrewjkennedy
Differential Revision:
D17208027
fbshipit-source-id:
aeda3c753d7e74bc67575b75105d7b31a6319453