Zimbabwe's ruling party has sacked President Robert Mugabe as party leader and replaced him with recently fired vice president Emmerson Mnangagwa.