Reworked logistic regression classifier

Merged PR #1227 to master and reworked logistic regression module to conform with new machine learning framework architecture.
for cleaner code, please remove all the "cv::"; all the code is already within cv namespace.