Make solver_mode an enum

Change solver_mode to an enum where "CPU" or "GPU" can be specified.  Specifying 0 for CPU and 1 for GPU will still work -- functionally only the change to caffe.proto was required.