Linear magnetoresistance in the charge density wave state of quasi-two-dimensional rare-earth tritellurides