CANBERRA, Australia — Kevin Rudd has wrenched back the job of Australian prime minister from the former deputy who took it from him three years ago, possibly just in time to lead his party to a defeat in upcoming elections.