Energy conversion and storage using insertion materials