Saad Hariri has announced his resignation as Lebanon's prime minister and implicitly blamed Iran and its Lebanese ally, Hezbollah, for his decision.