Add foldByKey

Motivation: https://groups.google.com/forum/?fromgroups=#!topic/spark-users/Uo2KCj5HJH4