Nonlinear energy-preserving model reduction with lifting transformations that quadratize the energy