Seol mar théacs é seo: Performance of the CMS Level-1 trigger during commissioning with cosmic ray muons and LHC beams