Mohammed Morsi, the Islamist leader ousted by the army in 2013, dies after collapsing in a courtroom.