add static codegen for jl_is_leaf_type and jl_subtype

solves some part of #7060. I'm not so sure about method_exists because you can add methods after codegen.