[SPARK-2207][SPARK-3272]Add minimum information gain and minimum instances per node as training parameters for decision tree.

These two parameters can act as early stop rules to do pre-pruning. When a split cause cause left or right child to have less than `minInstancesPerNode` or has less information gain than `minInfoGain`, current node will not be split by this split.

When there is no possible splits that satisfy requirements, there is no useful information gain stats, but we still need to calculate the predict value for current node. So I separated calculation of predict from calculation of information gain, which can also save computation when the number of possible splits is large. Please see [SPARK-3272](https://issues.apache.org/jira/browse/SPARK-3272) for more details.

CC: @mengxr @manishamde @jkbradley, please help me review this, thanks.
noSplit is never really used, so it could be removed.  I would treat splits as normal (returning a split even if its gain is invalid); this should work since the split is never checked against noSplit (since the gain has all needed information).