Fixed bugs in cpp code where gini impurity was not being weighted correctly in the gini_gain function.