Rewrite from scratch

Start from a blank slate and rewrite. Mostly ended up in the same
place, but helped me think through things.

Support for downloading MNIST digits, logistic regression and neural
networks from Theano, and submitting to Spark.