fix a missing GC root in codegen
fix order of initialization in jl_new_datatype (memory bug)