India's foreign ministry has urged its citizens to leave Iran, where rights groups say a crackdown on mass protests has killed and arrested thousands of people.