US food retailer and distributor Spartan Stores has reported higher quarterly profits despite a fall in sales as earnings were boosted by a programme to consolidate its warehouses.