Asymptotic theory of propagation in curved and nonuniform waveguides