Somalia’s new president has called for a united front against extremists and said he aims to bring together the country’s feuding Islamic factions.