Twitter has sued the government of Prime Minister Narendra Modi over an escalating attempt to control content available on open platforms in India.