Foreign investors pulled a record $16.5 billion out of Indian stocks this year