Macy’s Inc. raised its annual outlook and reported its best comparable sales growth in three years, the latest signs that consumers are still spending despite concerns about inflation and tariffs.