qam: refactor modulation out of dsp.py