[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.
If the client is null the receiver would never have started, since that is when the client is created. It would be null only if the `SpecificRequestor.getClient` threw, which means that the receiver would not start. poll is guaranteed to not throw a non-fatal exception: http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/LinkedBlockingQueue.html#poll()