Optimization Of Muon Timing And Searches For Heavy Long-Lived Charged Particles With The Compact Muon Solenoid Detector At The Large Hadron Collider