Airbnb on Thursday sued New York City over its restrictions on short-term housing rentals, in a legal dispute that pits the company’s concerns about its ability to operate in a key market against the city’s efforts to address an affordable housing crisis.