After two years of political turmoil and paralysis, Lebanon has appointed a new prime minister.