Algerian PM to resign, paving way for vote after protracted protests