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.
AFAIK `foreach` doesn't need to collect the results of the closure into a new object, so you save a little in memory allocation. (For an Option that means not having to allocate a new Option, for a list it means not needing a completely new list with the transformed objects.)

Or, in other words: `map()` returns a `Seq[T]`, `foreach()` returns `Unit`.