internal/impl: treat a nil oneof wrapper as if it were unset

The old implementation had the behavior where a nil wrapper value:
	m := new(foopb.Message)
	m.OneofField = (*foopb.Message_OneofUint32)(nil)
was functionally equivalent to it being directly set to nil:
	m := new(foopb.Message)
	m.OneofField = nil
preserve this semantic in both the table-drive implementation
and the reflection implementation.

Change-Id: Ie44d51e044d4822e61d0e646fbc44aa8d9b90c1f
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/189559
Reviewed-by: Herbie Ong <herbie@google.com>
diff --git a/proto/reset_test.go b/proto/reset_test.go
index 0f2f8cd..11f1957 100644
--- a/proto/reset_test.go
+++ b/proto/reset_test.go
@@ -21,6 +21,7 @@
 		MapStringString:        map[string]string{},
 		OptionalForeignMessage: &testpb.ForeignMessage{},
 		OneofField:             (*testpb.TestAllTypes_OneofUint32)(nil),
+		OneofOptional:          (*testpb.TestAllTypes_OneofOptionalUint32)(nil),
 	}
 	m.ProtoReflect().SetUnknown([]byte{})
 
@@ -47,6 +48,9 @@
 	if m.OneofField != nil {
 		t.Errorf("m.OneofField = %p, want nil", m.OneofField)
 	}
+	if m.OneofOptional != nil {
+		t.Errorf("m.OneofOptional = %p, want nil", m.OneofOptional)
+	}
 
 	if got := m.ProtoReflect().GetUnknown(); got != nil {
 		t.Errorf("m.ProtoReflect().GetUnknown() = %d, want nil", got)