Nordstrom is closing stores that anchor two Massachusetts malls.