Modular API for RF and minor fixes

- Modular API for RF and BaggingMachine
- API examples for RF
- minor changes in RF
i would set num_bags = 10 by default as anyways num_bags = 0 wouldn't do anything...