Quantum transport in n-type and p-type modulation-doped mercury telluride quantum wells