Rite Aid narrows loss in Q1, beats Street