Musk’s lawsuit reflects growing tensions between internet firms and the nationalistic government of one of the world’s largest democracies.