encoding/protobuf: make map field as not required by default

in proto3 all fields are optional, thus making the map field optional as well.

Change-Id: I5397adf6bfc990d6af248acef5bc4dcdf89c5cdd
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/2981
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/encoding/protobuf/parse.go b/encoding/protobuf/parse.go
index 6432fce..dc1a230 100644
--- a/encoding/protobuf/parse.go
+++ b/encoding/protobuf/parse.go
@@ -545,6 +545,10 @@
 		o.parse(x.Options)
 		p.addTag(f, o.tags)
 
+		if !o.required {
+			f.Optional = token.NoSpace.Pos()
+		}
+
 	case *proto.Enum:
 		p.enum(x)