After hours of overnight negotiations, the department store reached a tentative agreement with the union representing thousands of workers in New York.