Surging demand for high-performance batteries triggered the largest-ever deal for lithium, the lightweight metal that’s a key component of the power systems in smartphones and electric cars.