Low mass dilepton production in pp and pA collisions as a signature of the thermalization of hadronic matter