refactored parentnode to opt_parentnode and build_tree to opt_build_tree in arguments to splitnode()
added option to perform input validity check to gini_impurity_measure()