DETROIT — General Motors has agreed to invest $3 billion in the Detroit-Hamtramck Assembly plant to build electric pickups, vans and battery modules, according to a copy of the proposed UAW contract obtained by Automotive News. The plant, which was scheduled to close in January, would employ 2,225 people at full capacity, GM told the union.