DenseLayer fix + MaxPool2DLayer + range instead of xrange in examples/mnist.py for Python 3 compatibility