Inquiry told images of Islamic State terrorist found on Rudakubana’s device and of teacher’s warning he could pose ‘huge risk’