Ionic-Liquid Gating in Two-Dimensional TMDs: The Operation Principles and Spectroscopic Capabilities