Algeria’s President Abdelaziz Bouteflika resigned on Tuesday, succumbing to a groundswell of public pressure after weeks of mass protests against his 20-year rule.