The change of variable z = exp(-%i * theta), converts integrate(cos(1/3*exp(-%i*theta)),theta,0,2*%pi) to %i*integrate(cos(z/3)/z, unit circle with clockwise orientation).
The integrand has a simple pole at zero. Computing the residue at 0 gives
integrate(cos(1/3*exp(-%i*theta)),theta,0,2*%pi) = 2*%pi
(Maybe Rupert missed the 1/z term in the change of variables.) Thus
(%i53) integrate(cos(1/3*exp(-%i*theta)),theta,0,2*%pi);
(%o53) 0
is a bug. Maybe somebody could report this.
--Barton