Police Scotland have launched an investigation after schools across Glasgow and the west of Scotland were targeted with malicious messages.