Algeria's President Bouteflika resigns after weeks of protests