Egypt court jails former PM for ‘illegal gains’