So is there a term for shifting the chords and melody in this way so that a repetitive melody has varying moments of dissonance and consonance relative to the chords?

I know of what you speak... very intimately. I see it as a stylistic phenomenon more than it is a theoretical one, because all music *toys with this relationship between melody and harmony in a similar way, some much more repetitively than others. I've thought about it as the "Genesis effect" before.... which I'm naming after the later version (Phil Collins led) of the progressive/jazz-rock/pop band, although I remember early versions of King Crimson (and many others) making it part of thier sound. (believe me I use the term jazz quite "lightly") Even Duke Ellington played with this a bit as did Stan Kenton, IIRC.

The passing nature of the relationship between moving *chord and stable melody help propell the harmony forward... as tension sets up release (and for me, versa-vice ). This form of chromatic movement(s) are quite prevelant (by aural implication, anyway) in early "modal based" compositions, although restricted to passing tone-vs-consonant harmony status by the lack of exposure to dissonace and the subsequent social castration one would experience at the time had you done too much of it. You could be shot for not resolving such dissonance.

We've come a long way to find that Phil Collins *artfully is a bit "vanilla".