Somalia's prime minister resigns