CForest new version

Do not focus on the documentation, I am leaving it for the end since there are a lot of changes and probably more to come.
Is we really have to use global vars and there is no way around it, please make them static or part of an anonymous namespace. Also, we use all upper case names for globals.