Emergent Halperin-Saslow mode and Gauge Glass in quantum Ising magnet TmMgGaO$_4$