cmd/protoc-gen-go: fix Reset method

The MessageInfo cache, once set, must not be cleared, otherwise
there exists a *messageState value where the MessageInfo value is nil.
Fix the generation of the Reset method to avoid clearing this value.

Change-Id: Ic84ca8b2640a43e967c36993da1ccd3f2b7096c4
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/201478
Reviewed-by: Damien Neil <dneil@google.com>
diff --git a/internal/testprotos/benchmarks/benchmarks.pb.go b/internal/testprotos/benchmarks/benchmarks.pb.go
index 7490e11..ec73b74 100644
--- a/internal/testprotos/benchmarks/benchmarks.pb.go
+++ b/internal/testprotos/benchmarks/benchmarks.pb.go
@@ -74,6 +74,11 @@
 
 func (x *BenchmarkDataset) Reset() {
 	*x = BenchmarkDataset{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_benchmarks_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
 }
 
 func (x *BenchmarkDataset) String() string {