Fix multi-GPU auto-config code
Unit test for #192
Merge branch 'master' into GLStats