Fermi surface nesting and charge-density wave formation in rare-earth tritellurides