How the U.S. let EV battery tech born here wind up in the hands of China