The U.S. economy expanded at a 2.8 percent annual rate from July through September, the Commerce Department reported Wednesday, driven largely by resilient consumer spending.