A Globalized and Preconditioned Newton-CG Solver for Metric-Aware Curved High-Order Mesh Optimization