Amazon plans to invest $10 billion toward building a campus in North Carolina to expand its cloud computing and artificial intelligence infrastructure, bringing a massive shot in the arm to a region where many textile and apparel jobs dried up a generation ago.