Tidal dissipation in planet-hosting stars: damping of spin-orbit misalignment and survival of hot Jupiters