SPARK-1730. Make receiver store data reliably to avoid data-loss on exec...

...utor failures.

Added a new method in Receiver, ReceiverSupervisor, ReceiverSupervisorImpl to store the data
and callback a supplied function with a given argument.
Not really. We have to protect against other threads having a reference to the ArrayBuffer corresponding to each block id. Specifically if a thread is in the store method and is adding values to the buffer, and another thread calls remove() on the same block id from the map - the buffer could still be changing while the 2nd thread is calling the callbacks. To prevent this, any operation on the buffer and removal from the map should be protected by the same lock. So any += calls to the buffer and any removes from the map should be synchronized. This ensures that there is no thread holding onto a reference of the buffer instance while the buffer is being removed from the map.