IR: re-organize where state goes to prepare for generics

* Rip out legacy code for generics
 * put scope in instruction instead of AST nodes
 * separate top level decl stuff from AST nodes
   - remove the assumption that there is a 1:1 correspondence
     between an output instruction and an AST node
   - This way we won't have to clone AST nodes for generics.
2f259b8176Andrew Kelley committed on 12/4/2016, 8:40:40 AMparentf6cbb73
10 files changedLine totals unavailable