Fix #996 (failure to take max speeds into account), add an automated test for such, and generally clean up/avoid rounding errors in the getCarSpeed code.