[hack] Type checker support for multiple concrete `as` constraints
[hack] Type checker support for multiple concrete `as` constraints

Summary:
It is already possible to specify multiple `as` constraints on generic parameters, using either the syntax
```
function foo<T as I as J>(...)
```
on the generic parameters themselves, or `where` constraints such as
```
function foo(...) where T as I, T as J
```
Subtype tests support this feature, so a value of type `T` can be passed to a function expecting an `I` or a `J`. But method invocation (and similar features) is not supported.

There is one design question that hasn't been completely resolved with this diff: what if more than one constraint type is valid? We don't reject overlapping constraints (e.g. and `I` or `J` that both implement the same named method) even though the constraint may not be satisfiable (because the methods have incompatible signatures, for instance). Instead, for now, we reject the ambiguity at the point of invocation. We may wish to revisit this choice in future.

The method `obj_get_` has been refactored a little in this diff, separating off a function `obj_get_concrete_ty` that deals with the case of a concrete class type. Also some renaming of parameters etc. to aid comprehension.

Differential Revision: D4029912

fbshipit-source-id: 9237b8cbd260adcfcdb4395d820c999ad8350c74

ylu1317/flow,nmote/flow,nmote/flow,claudiopro/flow,fletcherw/flow,JonathanUsername/flow,popham/flow,fletcherw/flow,AgentME/flow,gabelevi/flow,gabro/flow,MichaelDeBoey/flow,jamesgpearce/flow,samwgoldman/flow,gabelevi/flow,mroch/flow,gabelevi/flow,popham/flow,TiddoLangerak/flow,ForbesLindesay/flow,nmote/flow,jamesgpearce/flow,fletcherw/flow,AgentME/flow,JonathanUsername/flow,AgentME/flow,mroch/flow,JonathanUsername/flow,nmote/flow,samwgoldman/flow,AgentME/flow,TiddoLangerak/flow,mroch/flow,facebook/flow,samwgoldman/flow,jamesgpearce/flow,TiddoLangerak/flow,JonathanUsername/flow,claudiopro/flow,popham/flow,ylu1317/flow,TiddoLangerak/flow,jamesgpearce/flow,facebook/flow,gabro/flow,popham/flow,samwgoldman/flow,claudiopro/flow,gabelevi/flow,MichaelDeBoey/flow,ForbesLindesay/flow,MichaelDeBoey/flow,claudiopro/flow,gabelevi/flow,MichaelDeBoey/flow,ylu1317/flow,TiddoLangerak/flow,AgentME/flow,popham/flow,gabro/flow,mroch/flow,samwgoldman/flow,facebook/flow,mroch/flow,samwgoldman/flow,ForbesLindesay/flow,fletcherw/flow,JonathanUsername/flow,ForbesLindesay/flow,ForbesLindesay/flow,claudiopro/flow,facebook/flow,JonathanUsername/flow,gabro/flow,samwgoldman/flow,popham/flow,ylu1317/flow,fletcherw/flow,JonathanUsername/flow,ForbesLindesay/flow,jamesgpearce/flow,fletcherw/flow,gabelevi/flow,nmote/flow,popham/flow,mroch/flow,facebook/flow,MichaelDeBoey/flow,mroch/flow,gabro/flow,jamesgpearce/flow,facebook/flow,gabro/flow,ylu1317/flow,jamesgpearce/flow,gabelevi/flow,nmote/flow,nmote/flow,facebook/flow