Rite Aid finishes debt-refinancing transactions