Add basic code to fit logistic regression

Right now it runs out of memory on a medium instance. Need to use more memory
or a sparse matrix format (the smarter way).