Transformation of sine-Gordon solitons in models with variable coefficients and damping