GlobalFoundries plans to build two new semiconductor-manufacturing facilities in New York. The project will be undertaken under a U.S.-Japanese initiative, providing up to $21 billion in funding.