Hundreds of schools across Scotland and Northern Ireland were evacuated following widespread bomb threats sent by email, with police launching urgent investigations and pupils sent home.