Muon density measurements for the light and heavy mass groups of cosmic rays at the KASCADE-Grande observatory