The move is the latest sign that the pharmacy chain is struggling to cut costs, improve margins and find stability.