Make Function.prototype and Object.prototype lookups consistent
Make Function.prototype and Object.prototype lookups consistent

Summary:
Because builtins are merged in after local inference, we use a hack whereby a
strict lookup that hits Object.prototype first checks whether the property name
matches a static list of known Object.prototype members.

This diff refines that hack and applies it to Function.prototype lookups as
well.

Before this diff, we only looked up Object.prototype from builtins for strict
lookups, but we actually need to for non-strict lookup as well. For example, a
class that overrides `toString` or `valueOf` should still be consistent with
`Object`, same as any two user-defined classes.

Furthermore, we would fire the NonstrictReturning logic in cases where the
property would be found if we tried to look at Object.prototype. For example,
`o.toString && o.toString()`.

Reviewed By: bhosmer

Differential Revision: D3760168

fbshipit-source-id: d9762c87f0899490cb12409b0ab0ecb35cae1ced

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