A state of emergency has been declared in Ethiopia after the resignation of the country's prime minister, as the government seeks to stem political unrest amid long-standing demands for greater freedoms.