Retailer Nordstrom's second-quarter profit was flat on last year despite rises in sales, thanks to a series of company investments.