Rationalized the data format in mnist_loader, and minor improvements and simplifications for network_basic