.. malechh actually referred to a tribe from a country neighbouring India..(somewhere around Nepal if i remember correctly) - who did not follow the 'sanatan dharm' (old name of Hinduism)
The came to be used for non-hindus (and non-sikhs)... though not necessarily as a derogatory term.

It however does crop up in the litterature of Hindu Right Wing Sangh Parivar as generic term for Non-Hindus. And of course, you will also find in anti-indian anti-hindu sites too )

- google for more proof