protobuf: Add FieldFlag::Required and always serialize such fields


A proto2 required field has no implicit presence: it must appear on the
wire even when it holds the type's default value, otherwise a conformant
parser rejects the message as missing a required field.

Both serializers skip default-valued fields unless the field flags mark
the field as presence-aware. Add FieldFlag::Required to that set so that
the generator can mark required fields in a following change, and rename
isOneofOrOptionalField(), which no longer covers only oneof and optional
fields.

Nothing sets the flag yet, so this does not change the encoding of any
message on its own.

Task-number: QTBUG-149955
Pick-to: 6.12 6.11 6.8
Change-Id: I56b831393afc7a90a7547de0e6b76c022b7e11db
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
commitd0a5c9a7351f067eb09bb07df5ad377ff6ae7c4d
parent1e928ff49e6555ede700ca2e613b396dcd63d6b9
authorDennis Oberst <dennis.oberst@qt.io>
committerDennis Oberst <dennis.oberst@qt.io>
commit timeFri, 9 Oct 2026 12:58:48 +0000