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

...ient and AdaGrad
Came here to say what @jeffdonahue said. See the parallel example of `GetLayer`. `boost::variant` solves a different problem, namely implementing sum types.