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.
Pardon my rusty scala, I understand I can get rid of the match-case here (I initially had map call for that too, but I just felt there were too many map calls ;)), but how is foreach "cheaper" than map in this case? Wouldn't both cost pretty much the same?