[SPARK-3207][MLLIB]Choose splits for continuous features in DecisionTree more adaptively

DecisionTree splits on continuous features by choosing an array of values from a subsample of the data.
Currently, it does not check for identical values in the subsample, so it could end up having multiple copies of the same split. In this PR, we choose splits for a continuous feature in 3 steps:

1. Sort sample values for this feature
2. Get number of occurrence of each distinct value
3. Iterate the value count array computed in step 2 to choose splits.

After find splits, `numSplits` and `numBins` in metadata will be updated.


CC: @mengxr @manishamde @jkbradley, please help me review this, thanks.
If there are a lot of samples with the same value, then it could be faster to sort after counting:
* Create a Map[Double, Int] of counts.
* then sort the map's keys
It might also be shorter to implement using Scala's built-in aggregation methods (instead of a specialized getValueCount method).