GEM: Empowering MLLM for Grounded ECG Understanding with Time Series and Images