Millions of people in Scotland received an emergency alert to their mobile phones after the Met Office issued a red danger to life warning for wind.