An Egyptian court has sentenced ousted president Hosni Mubarak to three years in prison after finding him guilty of embezzling public funds.