Home Depot Inc.’s third-quarter results this week gave a glimpse into the looming issue of tariffs for major U.S. retailers.