Attacks are shattering the illusion of Saudi Arabia as a safe investment hub as it tries to attract foreign money and diversify away from oil.