Split and rename Types_js.typecheck
Split and rename Types_js.typecheck

Summary:
There's a function inside of `types_js.ml` named `typecheck` that does a bunch of stuff. Really it does two things:

1. Adds dependencies and dependents to the set of files which need to be merged.
2. Is a wrapper for `merge`

So I split `typecheck` into two functions:

1. `include_dependencies_and_dependents`
2. `merge`

I don't *really* need this diff. Originally, I needed this to build a more complicated `ensure_parsed` which would iteratively build the `to_merge` set until it hit a fixed point and called `merge`. But I eventually opted for a simpler solution (D8488316). Nevertheless, I think this is cleaner and makes the `typecheck` function less scary and makes it more obvious what these functions actually do.

Reviewed By: nmote

Differential Revision: D9114741

fbshipit-source-id: c81d0c44edd654270dd39459a7f25e3ba7dad0ee

mroch/flow,jamesgpearce/flow,nmote/flow,gabelevi/flow,jamesgpearce/flow,mroch/flow,popham/flow,jamesgpearce/flow,facebook/flow,JonathanUsername/flow,JonathanUsername/flow,facebook/flow,nmote/flow,JonathanUsername/flow,popham/flow,gabelevi/flow,popham/flow,facebook/flow,nmote/flow,jamesgpearce/flow,facebook/flow,jamesgpearce/flow,samwgoldman/flow,popham/flow,gabelevi/flow,gabelevi/flow,gabelevi/flow,mroch/flow,jamesgpearce/flow,samwgoldman/flow,mroch/flow,JonathanUsername/flow,JonathanUsername/flow,popham/flow,AgentME/flow,samwgoldman/flow,jamesgpearce/flow,JonathanUsername/flow,facebook/flow,nmote/flow,facebook/flow,samwgoldman/flow,popham/flow,nmote/flow,AgentME/flow,gabelevi/flow,samwgoldman/flow,AgentME/flow,samwgoldman/flow,popham/flow,JonathanUsername/flow,nmote/flow,mroch/flow,nmote/flow,AgentME/flow,mroch/flow,samwgoldman/flow,gabelevi/flow,facebook/flow,AgentME/flow,mroch/flow