Saudi Arabia opens $585 bln stock market to foreign investors