The Maoist Prime Minister of Nepal, Pushpa Kamal Dahal, has dramatically announced his resignation in a television address to the nation.