Macy's will be closing 100 stores, most in 2017. The company is planning to invest in its online operations after six quarters of falling sales.