Macy’s raised its sales forecast for the year after strong results at its upscale chain, highlighting how higher-income consumers continue to spend relatively freely.