Remove the dependency that TypeChecker and Emitter have on Program.

Instead, these layers explicitly specify the functionality they need, and don't take in anything extra.