Change solver.cpp

When cpu_diff is zero, we now set the momentum and local weight decay
both to 0 to turn off updating entirely. Now this function is only
implemented in SGD CPU mode