US retail giant Safeway has posted rising first-half sales and earnings.