internal/impl: change unmarshal func return to unmarshalOptions

The fast-path unmarshal funcs return the number of bytes consumed.

Change these functions to return an unmarshalOutput struct instead, to
make it easier to add to the results. This is groundwork for allowing
the fast-path unmarshaler to indicate when the unmarshaled message is
known to be initialized.

Change-Id: Ia8c44731a88f5be969a55cd98ea26282f412c7ae
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/215720
Reviewed-by: Joe Tsai <joetsai@google.com>
diff --git a/internal/impl/codec_tables.go b/internal/impl/codec_tables.go
index f421c78..38c4e7e 100644
--- a/internal/impl/codec_tables.go
+++ b/internal/impl/codec_tables.go
@@ -17,7 +17,7 @@
 type pointerCoderFuncs struct {
 	size      func(p pointer, tagsize int, opts marshalOptions) int
 	marshal   func(b []byte, p pointer, wiretag uint64, opts marshalOptions) ([]byte, error)
-	unmarshal func(b []byte, p pointer, wtyp wire.Type, opts unmarshalOptions) (int, error)
+	unmarshal func(b []byte, p pointer, wtyp wire.Type, opts unmarshalOptions) (unmarshalOutput, error)
 	isInit    func(p pointer) error
 }
 
@@ -25,7 +25,7 @@
 type valueCoderFuncs struct {
 	size      func(v pref.Value, tagsize int, opts marshalOptions) int
 	marshal   func(b []byte, v pref.Value, wiretag uint64, opts marshalOptions) ([]byte, error)
-	unmarshal func(b []byte, v pref.Value, num wire.Number, wtyp wire.Type, opts unmarshalOptions) (pref.Value, int, error)
+	unmarshal func(b []byte, v pref.Value, num wire.Number, wtyp wire.Type, opts unmarshalOptions) (pref.Value, unmarshalOutput, error)
 	isInit    func(v pref.Value) error
 }