Somali Prime Minister Ali Mohamed Gedi resigned on Monday after a long feud with the president that frustrated Western backers and split the government while it faced an Islamist…