Electrolytes for Lithium-Ion and Lithium Metal Batteries