World leaders hailed the election of Barack Obama — now the President-elect has to prepare for difficult foreign policy challenges.