Energy Department will lend G.M. and LG $2.5 billion to build battery factories. The loan will help the automaker and its supplier build electric vehicle battery factories in Ohio, Tennessee and Michigan.