Add a function for executing a module through the interpreter.

Since full evaluation may not be possible, it returns a new module that
contains the statements to be emitted by the code generator.