Former Egyptian president Hosni Mubarak has been cleared of the killing of protesters during the 2011 uprising that swept him from power, bringing an end to a politically-charged case that has lasted nearly six years.