Smart traffic lights that tell motorists how fast to drive to avoid a red light could be rolled out across Britain after trial finds they cut emission