move compiler translation out of ml_repl_stepScript.sml

for better modularity (esp. on a script that takes so long to build),
and for possible use elsewhere (e.g. to build some support theorems for
papers)