Fix incompatibilities with Python 3

I tried to use BackpropTrainer and ClassificationDataSet with Python 3 and hit a couple of syntax errors due to incompatibility. This pull request adds Python 2/3 compatible code for izip and reduce.