The Japanese automaker, which has been slow to sell electric vehicles, said it would invest $11 billion to make batteries…