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>