Fix MultiGPU solver test with TEST_GPUID != 1
Fix MultiGPU solver test with TEST_GPUID != 1

This is a patch for multi-gpu testing issue (#2926). The problem fixed in this
commit is that when calling make runtest with TEST_GPUID != 0 on a MultiGPU
machine, solver tests will crash because gpu ids in multi-gpu tests doesn't
match that of single GPU test.

wangg12/caffe,gnina/gnina,tackgeun/caffe,tackgeun/caffe,gnina/gnina,wangg12/caffe,longjon/caffe,tackgeun/caffe,CZCV/s-dilation-caffe,wangg12/caffe,CZCV/s-dilation-caffe,gnina/gnina,tackgeun/caffe,gnina/gnina,longjon/caffe,longjon/caffe,longjon/caffe,gnina/gnina,gnina/gnina,CZCV/s-dilation-caffe,CZCV/s-dilation-caffe,wangg12/caffe