Design features and test results of the CMS endcap muon chambers