[SPARK-2125] Add sort flag and move sort into shuffle implementations

This patch adds a sort flag into ShuffleDependecy and moves sort into hash shuffle implementation.

Moving sort into shuffle implementation can give space for other shuffle implementations (like sort-based shuffle) to better optimize sort through shuffle. 
Yes, it's true. But I will not change the original implementation, since [PR931](https://github.com/apache/spark/pull/931) will solve this issue.