Egypt held a military funeral in Cairo on Wednesday to bury its former president Hosni Mubarak, who ruled for 30 years until he was ousted in a 2011 popular uprising against corruption.