After years of struggling, the company’s four brands, including Old Navy and Banana Republic, are showing signs of life.