Hi! Those consecutive seventh chord pairs (A7 to D7, G7 to C7, etc) are SECONDARY DOMINANTS and "KEY MODULATIONS VIA DOMINANT".
To start: It's essential to understand that you can't think about FIXED KEYS when working in jazz harmony. In jazz, you need to think in a chord-by-chord basis. In jazz, the chord is the king. It's not a must to respect a specific key during the song, even if it starts and ends with the same chord.
This said, you still need to rely on a good sounding method to include those non-diatonic ("off key") chords in your song. More on this below.
First, let's talk about the Circle of Fourths (inverted Circle of Fifths):
Circle of Fourths: C - F - Bb - Eb - Ab - Db - Gb - B - E - A - D - G ...... C.
(Central point: ii - V and ii-V-I have their roots in consecutive notes in the Cycle!
Examples: Cmin7 - F7 - Bbmaj7
Dm7b5 - G7alt - Cmin7 ....etc.
Let's suppose the song starts in the key of F (major):
Degree Note Diatonic Chord
I F Fmaj7
II G Gm7
III A Am7
IV Bb Bbmaj7
V C C7 (this is the DIATONIC DOMINANT CHORD of the scale). This is, V/I
VI D Dm7
VII E Em7b5
When you see those non-diatonic ("off key") 7th "dominant" chords in the song, they would be serving as one of these:
1.) Secondary dominants: The only diatonic ("on-key") dominant seventh chord in the key of F is C7 (dominant in the V degree), which will work for our diatonic V7-Imaj7 resolution (C7 to Fmaj7).
Now, you can add SECONDARY DOMINANTS. These are dominant chords located in the "V degree of each one of the diatonic chords!). This is, you are not limited to the diatonic V/I, but you can have:
V/II (D7 to Gm7)
V/IV, (F7 to Bbmaj7), and so on... you can do it with all diatonic chords except for the VII degree (V/VII is not used).
So, SECONDARY DOMINANTS are dominants to resolve to any DIATONIC chords.
Now, you mention chord sequences like D7-G7. This is called an EXTENSION DOMINANT.
2.) Extension dominants: These are "dominant chords for SECONDARY dominant chords". This is, you can take any SECONDARY DOMINANT chord and put a dominant chord to it! This will cause a "delayed resolution" to any diatonic chord. For example, you mentioned A7 - D7. this is:
A7 is the extension dominant of D7 (a dominant on the V degree of another non-diatonic dominant).
D7 is the extension dominant of G7 (a dominant on the V degree of the another non-diatonic dominant).
G7 is the extension dominant of C7 (which is finally the diatonic V7 chord in the key of F).
Then, you could play the perfect cadence V-I (C7 - Fmaj7), go from C7 to a different tonic chord in F (Dm7 or Am7), or go from C7 to a subdominant chord, etc. possibilities are endless.
_________
You also ask about Bm7b5 - Em7b5 - Am7b5. This is also derived from the extension and secondary dominant thing. You can think about m7b5 chords as "rootless dominant chords with a 9th".
Try it:
Play Bm7b5, then put G in the bass. This is G7/9
Em7b5, then put C in the bass. This is C7/9
Am7b5, then put F in the bass. This is F7/9
So, if you play Bm7b5 - Em7b5 - Am7b5, you are simply playing G7 - C7 - F7 (a progression of dominants across the circle of fourths). in this particular case, the dominant #2 (C7) is the diatonic dominant of the original key; however, if the song goes to F7 instead or resolving to Fmaj7, the song will wander a bit before arriving to that "home" chord.
If you are interested in harmony and jazz analysis or songwriting lessons, please let me know! I can provide you will really cool and challenging interactive exercises.
Have a great weekend!
Carlos