David Cameron has returned to government as UK foreign secretary, in a stunning comeback for the former prime minister.