rework toplevel again, define compile_top for modules

current tests pass, proofs broken.
no tests of modules yet.
a couple of elementary module compilation tests