[SPARK-2207][SPARK-3272][MLLib]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.
minInstancesPerNode's default value is 1, which is tested by other test cases.

If I change `strategy.minInstancesPerNode` to 2(which is 4 right now), other parts don't need to change, because no there are only three instances, no split can make left and rightchild to have 2 instances. So I think setting `minInstancesPerNode` to 2 is more reasonable than 4 in this test case. Does this change satisfy your needs? Or should I increase the instances number and test  `minInstancesPerNode` is 2 and 4 at the same time?