[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.
"MetaData" --> "metadata"