Heavy ion physics at the LHC with CMS