Algiers is shopping a plan to restore democracy after the coup in Niamey and stave off a foreign military intervention