Modified ScalaCodegen.emitForwardDef to allow specialization, added a script for tests diff.