unify treatment of is AnyArray and is_any_array
Summary:
Refinement for `if is_any_array(e) ...`used separate code from `if (e is AnyArray<_,_>) ...`. This makes them both use the `is` refinement code, which works better with negated types, and like types.
Add a flag `hint_first` to the refinement code because the old `is_any_array` built the intersection with the hint first, whereas the `is` code puts the hint last, and various things are sensitive to the order of intersections.
The `is_any_array` code was also buggy. For example, this should signal a type error but didn't because the `is_any_array` refinement was incorrectly setting the tpenv consistency to false. It will type error now.
```
function f(shape(...) $s, mixed $m) : void {
if (HH\is_any_array($s)) {
HH\idx($s, $m);
}
}
```
Reviewed By: CatherineGasnier
Differential Revision:
D32616352
fbshipit-source-id:
ad50824ee6d93aa3281fec11dcf58d2200b1bb0c