Pion form factor in QCD: From nonlocal condensates to next-to-leading-order analytic perturbation theory