One thing that I always keep in mind on this debate is santitization. Not all of the tales of off flavors come from the beer sitting on the yeast cake too long, but rather bugs that made it into the beer.
That said, yeast are the only thing that will 'clean up' your beer. If that is what you want, then leave the beer in contact with the yeast as long as possible. IMO, the only reason to secondary is to 1) leave a little off flavor, and 2) get clear beer fast. If you want a little yeast by-product, e.g., a touch of diacetyl in an ESB, then transfer to secondary. If you need to turn over your beer faster and want it clear, then transfer to secondary. When you transfer beer, you force the yeast to flocculate and fall out of suspension faster. I believe the theory on this is that the mechanical action of the fluid transfer causes CO2 to offgas, creating bubbles and thereby nucleation sites for yeast to flocc. There are many pics of this online where people do side by side comparisons, and the rate at which the yeast falls out of suspension is dramatic.