A triple-GEM detector for the muon system of the LHCb experiment