make solver_mode an enum with CPU and GPU -- fully backwards compatible
with old 0/1 style
Merge pull request #403 from jeffdonahue/solver-mode-enum

Make solver_mode an enum: CPU or GPU