reflect/protoreflect: drop the ProtoEnum type

Drop the protoreflect.ProtoEnum type (containing a single method
returning a protoreflect.Enum) and make generated enum types
directly implement protoreflect.Enum instead.

Messages have a two-level type split (ProtoMessage and Message) to
minimize conflicts between reflection methods and field names. Enums
need no such split, since enums do not have fields and therefore have
no source of conflicts.

Change-Id: I2b6222e9404253e6bfef2217859e1b760ffcd29b
Reviewed-on: https://go-review.googlesource.com/c/156902
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Reviewed-by: Damien Neil <dneil@google.com>
diff --git a/internal/value/convert.go b/internal/value/convert.go
index 1722d01..9e40ac2 100644
--- a/internal/value/convert.go
+++ b/internal/value/convert.go
@@ -31,7 +31,7 @@
 	stringType  = reflect.TypeOf(string(""))
 	bytesType   = reflect.TypeOf([]byte(nil))
 
-	enumIfaceV2    = reflect.TypeOf((*pref.ProtoEnum)(nil)).Elem()
+	enumIfaceV2    = reflect.TypeOf((*pref.Enum)(nil)).Elem()
 	messageIfaceV1 = reflect.TypeOf((*papi.Message)(nil)).Elem()
 	messageIfaceV2 = reflect.TypeOf((*pref.ProtoMessage)(nil)).Elem()
 
@@ -122,14 +122,14 @@
 	case pref.EnumKind:
 		// Handle v2 enums, which must satisfy the proto.Enum interface.
 		if t.Kind() != reflect.Ptr && t.Implements(enumIfaceV2) {
-			et := reflect.Zero(t).Interface().(pref.ProtoEnum).ProtoReflect().Type()
+			et := reflect.Zero(t).Interface().(pref.Enum).Type()
 			return Converter{
 				PBValueOf: func(v reflect.Value) pref.Value {
 					if v.Type() != t {
 						panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), t))
 					}
-					e := v.Interface().(pref.ProtoEnum)
-					return pref.ValueOf(e.ProtoReflect().Number())
+					e := v.Interface().(pref.Enum)
+					return pref.ValueOf(e.Number())
 				},
 				GoValueOf: func(v pref.Value) reflect.Value {
 					rv := reflect.ValueOf(et.New(v.Enum()))