Gloucester’s Thomas headed to All-State semifinals