Analytic equilibrium of elongated plasmas bounded by a magnetic separatrix and the problem of resistive axisymmetric X-point modes