Tariff refunds boosted second-quarter profits at retailers from Walmart to Lowe's, but different accounting treatments made comparisons difficult.