cmd/protoc-gen-go: add support for field-tracking

Field-tracking is an experimental feature in the Go linker
where it statically tracks whether a Go struct field is used.
This CL modifies the generator to emit special markers that
tells the linker to know which fields to track.

Change-Id: I235da3f3d6c0ef2021b5fe1c16106ebb8fd6f557
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/189558
Reviewed-by: Damien Neil <dneil@google.com>
diff --git a/internal/testprotos/annotation/annotation.proto b/internal/testprotos/annotation/annotation.proto
new file mode 100644
index 0000000..421631e
--- /dev/null
+++ b/internal/testprotos/annotation/annotation.proto
@@ -0,0 +1,19 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+syntax = "proto2";
+
+package go_annotation;
+
+import "google/protobuf/descriptor.proto";
+
+option go_package = "google.golang.org/protobuf/internal/testprotos/annotation";
+
+extend google.protobuf.MessageOptions {
+  // Setting this on a message enables tracking of which fields in the message
+  // a specific binary might access. As a consequence, it also disables the use
+  // of the message accessor methods to satisfy interfaces: they can only be
+  // called directly.
+  optional bool track_field_use = 37383685;
+}