Embattled prime minister steps down following days of violent protests sparked by a botched bid to raise fuel prices.