[SPARK-4121] Set commons-math3 version based on hadoop profiles, instead of shading

In #2928 , we shade commons-math3 to prevent future conflicts with hadoop. It caused problems with our Jenkins master build with maven. Some tests used local-cluster mode, where the assembly jar contains relocated math3 classes, while mllib test code still compiles with core and the untouched math3 classes.

This PR sets commons-math3 version based on hadoop profiles.

@pwendell @JoshRosen @srowen
It is not necessary to override it at this time. But this will be useful when, for example, hadoop-2.6 starts using commons-math3-3.3. If someone update the pom at that time, he might forget to add this line to hadoop-2.3 and hadoop-2.4 profiles.