refactored CascadeClassifier class to hide the implementation details

that will simplify the work on adding the OpenCL path