Kevin Rudd resigns as Australian foreign minister