Logistic Regression: Refactor iteration controller

Other minor changes:
- Move all code into Python abstraction layer
- All internal functions now start with __
- Added argument validation for logistic regression
- In cv_utils, added functions to help return array from Python
    to older versions of database system. However, its usage in
    logistic regression turns out to be unnecessary
- Updated control.py_in to evaluate all forms of expression
- Removed the _args from update function in logistic.py_in since
    it wasn't being used. This avoids the problem of qualifying
    an array expression with the table name.