AST Validation

AST validation is the process of checking various correctness properties about the AST after macro expansion.

TODO: write this chapter. #656