The New York City Council has passed a measure outlawing horse-drawn carriages, with a vote margin too large for a mayor’s veto to overturn.