ARROW-11560: [C++][FlightRPC] fix mutex error on SIGINT
ARROW-11560: [C++][FlightRPC] fix mutex error on SIGINT

Recently, interrupting a Python Flight server started aborting the process instead, because gRPC on Linux started using some code which is not signal-safe. This PR fixes that by spawning a separate thread that reads a byte from a self-pipe, then shuts down the server; the signal handler write to the pipe (which is a signal-safe operation).

This is a little janky, but fixes the issue. This still builds on Windows in my tests, but I couldn't actually import the resulting PyArrow to test it. However, PyArrow 3.0 via Conda still works on Windows. I'm not able to test on MacOS myself.

Closes #9633 from lidavidm/arrow-11560

Authored-by: David Li <dc24f9cfc84fb1675ce65c8444a2c3e2f0e5f297@gmail.com>
Signed-off-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>

laurentgo/arrow,laurentgo/arrow,icexelloss/arrow,apache/arrow,icexelloss/arrow,cpcloud/arrow,icexelloss/arrow,apache/arrow,apache/arrow,apache/arrow,kou/arrow,cpcloud/arrow,cpcloud/arrow,wesm/arrow,kou/arrow,cpcloud/arrow,laurentgo/arrow,cpcloud/arrow,cpcloud/arrow,icexelloss/arrow,cpcloud/arrow,icexelloss/arrow,wesm/arrow,apache/arrow,wesm/arrow,icexelloss/arrow,apache/arrow,kou/arrow,laurentgo/arrow,laurentgo/arrow,kou/arrow,apache/arrow,wesm/arrow,apache/arrow,icexelloss/arrow,cpcloud/arrow,wesm/arrow,apache/arrow,laurentgo/arrow,laurentgo/arrow,laurentgo/arrow,cpcloud/arrow,icexelloss/arrow,wesm/arrow,laurentgo/arrow,wesm/arrow,wesm/arrow,kou/arrow,cpcloud/arrow,kou/arrow,kou/arrow,kou/arrow,laurentgo/arrow,apache/arrow,apache/arrow,icexelloss/arrow,cpcloud/arrow,kou/arrow,laurentgo/arrow,kou/arrow,kou/arrow,cpcloud/arrow,cpcloud/arrow,laurentgo/arrow,cpcloud/arrow,icexelloss/arrow,laurentgo/arrow,apache/arrow,wesm/arrow,icexelloss/arrow,kou/arrow,apache/arrow,laurentgo/arrow,wesm/arrow,icexelloss/arrow,icexelloss/arrow,wesm/arrow,wesm/arrow,wesm/arrow,kou/arrow,laurentgo/arrow,icexelloss/arrow,apache/arrow,wesm/arrow,kou/arrow