test client-interceptors: serialize writes in bidi echo
The server-side bidi handler could issue multiple concurrent Write
operations when Reads completed before the previously enqueued write op
finished, leading to GRPC_CALL_ERROR_TOO_MANY_OPERATIONS and flaky
crashes. Queue outgoing messages and ensure only one Write is in flight.
Also move shared functionality, like the handlers and callbacks into the
data class to avoid tricky usage in combination with shared_ptr and mem
leaks.
Amends 9b6795e002a7d05b041e100bf638dcc929e0a91c.
Task-number: QTBUG-144179
Pick-to: 6.11
Change-Id: I1a829acb7e4ae71caf6f59a570a733f72a65848e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>