Robert Mugabe resigns as Zimbabwe's president a week after the army and his former political allies moved against him, ending four decades of rule by a man who turned from independence hero to archetypal African strongman.