Self-similar theory of nonisothermal vapor condensation on a droplet growing in a vapor-gas medium