[common] fix value ranges with neg. stepsize
[cmake] apparently we've lost linking pthreads to gtest somewhere...