Update the type system and repl semantics.

The type system now directly tracks which modules, types and exceptions
have been declared, instead of inferring that from the various
type environments. Combined with having the cenv in the closure, this
should simplify the case where an exception occurs mid-way through a
module in the REPL.
More work toward the new scheme for tracking declarations
Slight progress on type soundness
More type soundness.
More type soundness
Merge branch 'cenv_close' of github.com:xrchz/vml into cenv_close