pw_rpc: Update protocol for server streams

Update the server-to-client RPC packet types so that the packet type
unambiguously indicates whether it is the first or last packet. This is
already the case for client-to-server RPC packet types.

- Have RESPONSE always be the last packet in the stream. For RPCs
  without a server stream, it includes a payload. Remove
  SERVER_STREAM_END.
- Introduce the SERVER_STREAM packet, to parallel the CLIENT_STREAM
  packet.
- Update the server and client code and tests. Test that old-style
  streaming RPCs still work correctly.
- Refactor the duplicate MessageOutput class into a FakeChannelOutput
  used by both Nanopb and raw RPCs.
- In C++, don't encode default-valued payload and status fields.

Change-Id: I218772dad6c2981dda5f032f298ea43ee5e08b4d
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/49822
Commit-Queue: Wyatt Hepler <hepler@google.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
diff --git a/pw_rpc/nanopb/codegen_test.cc b/pw_rpc/nanopb/codegen_test.cc
index 12ea706..36f0a4c 100644
--- a/pw_rpc/nanopb/codegen_test.cc
+++ b/pw_rpc/nanopb/codegen_test.cc
@@ -215,12 +215,11 @@
 
   PW_ENCODE_PB(
       pw_rpc_test_TestStreamResponse, response, .chunk = {}, .number = 11u);
-  context.SendResponse(OkStatus(), response);
+  context.SendServerStream(response);
   EXPECT_TRUE(result.active);
   EXPECT_EQ(result.response_value, 11);
 
-  context.SendPacket(internal::PacketType::SERVER_STREAM_END,
-                     Status::NotFound());
+  context.SendResponse(Status::NotFound());
   EXPECT_FALSE(result.active);
   EXPECT_EQ(result.stream_status, Status::NotFound());
 }