net: refactored regularize-theta and cost-function
implemented most of the rest of the algorithm

* still have a few more things to work on in the algorithm

* it looks like one class is overweighting the other classes (only one class of theta2 is filled)

* there could be a rounding error, because values of theta1 become extreme