US grocery retailer Safeway has reported a sharp drop in quarterly profit due to the impact of a labour dispute in Southern California, which lasted more than four months.