According to [1], map encoding must be compatible with a repeated message
using indices 1 and 2 for key and value. In particular this implies that
both key and value may be omitted when they are equal to the default
value - which some protobuf implementations like protobuf-c actually do.
The comments in the added testcase are based on the output of
protobuf-inspector [2].
[1] https://developers.google.com/protocol-buffers/docs/proto3#backwards-compatibility
[2] https://github.com/jmendeth/protobuf-inspector
Based-on-patch-by: Shrimpz <Shrimpz@qq.com>
Co-authored-by: Alexander Fenster <fenster@google.com>