Understanding avalanches in a Micromegas from single-electron response measurement