Add module declaration type checking
Summary:
# High Level
This threads module declarations through `hh_server` such that they are now understood and are accessible across files. The main effect is that declaring a file to be a part of a module requires that said module has an existing declaration in the current codebase. For example:
```
//// a-decl.php
<?hh
<<file:__EnableUnstableFeatures('modules')>
module A {}
//// a.php
<?hh
// Unbound name error w/o `a-decl.php`
<<file:__EnableUnstableFeatures('modules'), __Module('A')>>
```
# This Diff
## Naming
It's now an unbound name error to reference being a part of a module w/o a corresponding module declaration, as per the high level context.
## Tests
This is where most of the tests are added / modified, including but not limited to:
* Adding module declarations to existing tests so that we aren't flooded w/ naming errors. This is generally in a separate file, but there's no set rule about where to put module decls.
* Added a test to ensure that modules are included in the naming table
* Added fanout tests covering:
* Adding a reference to a nonexistent module, then adding the module decl
* Making a file part of a module and making a class internal
* Changing the membership for a module in a class
* Making a function internal
* Making a typedef internal
* Removing a module decl
* Added *some* more typechecking tests, such as an edge case around ordering between top level decls and file attributes. Notably, the `hphp/hack/test/typecheck/modules/file_attribute_order.php` file has a difference here.
Differential Revision:
D34481127
fbshipit-source-id:
c47dd9eaf15fb7eb1164a3e503a536f649299987