[SPARK-3154][STREAMING] Make FlumePollingInputDStream shutdown cleaner.

Currently lot of errors get thrown from Avro IPC layer when the dstream
or sink is shutdown. This PR cleans it up. Some refactoring is done in the
receiver code to put all of the RPC code into a single Try and just recover
from that. The sink code has also been cleaned up.
There maybe a race condition here. A thread that might have called `getEventBatch()` and created a processor, before the shutting down thread (i.e., the one that called `shutdown()`) marks `stopped` as true. But that thread may not have added the processor to `processorsToShutdown` yet, and the shutting down thread may have already completed the shutdown function. In that case, there is a zombie processor that is never shutdown.