India's parliament has passed a controversial bill aimed at overhauling laws governing Islamic charitable endowments, known as waqf, despite sharp criticism from Muslim groups and opposition parties.