add option to change the number of maximum parallel jobs
add error handler
Refactor code. Remove old regression tree classes. Add class TreeBuilder
and ThreadTreeBuilder.
fix problem when caching