Implemented Nesterov trainer

Added Nesterov trainer.

Code adapted from Caffe:

https://github.com/BVLC/caffe/issues/53

https://github.com/BVLC/caffe/blob/master/src/caffe/solver.cpp