Movies like ‘The French Connection’, ‘Midnight Cowboy’ and ‘Death Wish’ depicted the Big Apple as a scuzzy metropolis of filth and grime. And despite the reported fury of the New York Mayor’s Office, they helped define the city as we know it to this day, writes Xan Brooks