pw_rpc: Method union class

This adds a MethodUnion class which can store one of multiple
method types, and updates the base Service class to store them instead
of concrete Methods. A MethodUnion class for raw methods and for
nanopb/raw methods is added to the respective submodules. Also, the
nanopb codegen API and script are updated to deduce a method type from
an implementation's signature, and create the invoker automatically.

This does not update the TestMethodContext class to work with the new
changes; tests depending on it are temporarily disabled until fixed.

Change-Id: I982662fb2b022323c8df293bf34d5fca9a8d91c0
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/21242
Reviewed-by: Wyatt Hepler <hepler@google.com>
diff --git a/pw_protobuf_compiler/proto.gni b/pw_protobuf_compiler/proto.gni
index 01521d1..37a1c28 100644
--- a/pw_protobuf_compiler/proto.gni
+++ b/pw_protobuf_compiler/proto.gni
@@ -163,7 +163,7 @@
     deps = [ ":$_gen_target" ]
     public_deps = [
                     "$dir_pw_rpc:server",
-                    "$dir_pw_rpc/nanopb:method",
+                    "$dir_pw_rpc/nanopb:method_union",
                     "$dir_pw_third_party/nanopb",
                   ] + invoker.gen_deps
     public = get_target_outputs(":$_gen_target")