When an HPV infection is cleared by the body, is it 100% gone or does it just go dormant? Do any traces of it remain?

Dormant. HPV comes from a family of viruses that can remain dormant in your system for your lifetime. It can possibly re-activate, and you can shed virus without knowing it. For some strains, the long term effect involves transformation of affected tissues to cancer. However, for most this is just a possibility, not an expected outcome.
See answer. It is a very good question. For most people it appears that the immune system ultimately succeeds in clearing the virus from the body or that the virus is suppressed below our current ability to detect it. It is unknown what proportion of hpv infections go latent, nor what proportions are truly cleared by the body.