Add binding kind to name_resolver entries
Add binding kind to name_resolver entries

Summary:
We emit errors on things like:
1. Reassigning a constant
2. Reassigning a class
3. Redeclaring non-vars
4. Reassigning functions
... (and many more)

In order to emit these kinds of errors, the name_resolver must be aware of what _kind_ of bindings are in the env_state.env.

This diff adds that information to the entires in the environment.

The next diff adds an "Undeclared" Val.write_state to indicate variables whose declarations have not yet been seen (and to distinguish them from being uninitialized).

The diff after that one preps EBindingErrors to be emitted from the name_resolver

The diff after that sets up scopes for declared modules, since the errors emitted here are too noisy until that fix is in place

After that, youll find a series of diffs implementing individual reassignment/redeclaration errors.

Reviewed By: mvitousek

Differential Revision: D33135023

fbshipit-source-id: 23aa9eac87a09ef6273f4892e879b76a205a027e

facebook/flow,mroch/flow,facebook/flow,facebook/flow,facebook/flow,facebook/flow,facebook/flow,mroch/flow,mroch/flow,facebook/flow,mroch/flow,mroch/flow,mroch/flow,mroch/flow