GM is investing almost $1 billion to ensure its access to a key mineral for EV batteries