ENH: tidy up some of the forest code (inspired from bagging.py)