"(No I am not talking about modern day conversions. I am talking about why we lost so easily to Ghaznis, Ghoris and Europeans even though we had a good population (unlike native Americans) and scientific brains (unlike African tribes)"
Do you have figures of native American population? Why do you think African brains are not scientific? You should think about the fact that a period of 500 years elapsed between Mir Qasim taking over Sindh and Ghauri penetrating central India. Indians fought long and hard, and they were colonised despite this, not because of caste system.
"and resistance to all the deseases introduced by Westerners (unlike Aztecs and other South Americans). We are the only country (may be countries) in the world which was divided and was ruled by a small group of people. I blame teh caste system here because if the lower caste people who were majority had gotten decent opportunity for a decent living,"
And they did. They lived quite decently. Only untouchables seem to have suffered, but there are reports even of prosperous untouchables in medieval times.