codegen: enforce closed-enum unknown-field limits (#313)