Solver switching support & implementation of Nesterov's accelerated grad...

...ient and AdaGrad
@jeffdonahue @leelurch @Yangqing thanks for the comments! I've fixed the constructor in the latest commit. :)