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

...ient and AdaGrad
@jeffdonahue @longjon Thanks for the helpful comments! I've restored the virtual keywords accordingly.