Countdown timers that let motorists know when a traffic light will go from green to yellow lead to safer responses from drivers, research suggests.