Essex pupil 'linked to terror raid'