Circular and linear magnetic quantum ratchet effects in dual-grating-gate CdTe-based nanostructures