proto: fix DiscardUnknown

UnmarshalOptions.DiscardUnknown was simply not working. Oops. Fix it.
Add a test.

Change-Id: I76888eae1221d99a007f0e9cdb711d292e6856b1
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/216762
Reviewed-by: Joe Tsai <joetsai@google.com>
diff --git a/proto/decode.go b/proto/decode.go
index 83942ea..9a6b2f7 100644
--- a/proto/decode.go
+++ b/proto/decode.go
@@ -154,7 +154,9 @@
 			if valLen < 0 {
 				return wire.ParseError(valLen)
 			}
-			m.SetUnknown(append(m.GetUnknown(), b[:tagLen+valLen]...))
+			if !o.DiscardUnknown {
+				m.SetUnknown(append(m.GetUnknown(), b[:tagLen+valLen]...))
+			}
 		}
 		b = b[tagLen+valLen:]
 	}