Two-phase argon and xenon avalanche detectors based on Gas Electron Multipliers