SPARK-2282: Reuse Socket for sending accumulator updates to Pyspark

Prior to this change, every PySpark task completion opened a new
socket to the accumulator server, passed its updates through, and
then quit. I'm not entirely sure why PySpark always sends accumulator
updates, but regardless this causes a very rapid buildup of ephemeral
TCP connections that remain in the TCP_WAIT state for around a minute
before being cleaned up.

Rather than trying to allow these sockets to be cleaned up faster, this
patch simply reuses the connection between tasks completions (since they're
fed updates in a single-threaded manner by the DAGScheduler anyway).

The only tricky part here was making sure that the AccumulatorServer was
able to shutdown in a timely manner (i.e., stop polling for new data), and
this was accomplished via minor feats of magic.