An Egyptian appeals court ruled for a retrial of ex-President Hosni Mubarak, retracting his previous life sentence over the deaths of protesters.