trap interrupt in REPL

move ClassRedefinitionError from AST Rewriter to ClassMap