Performance optimization for the `genshi.core._ensure` function: instead of checking whether we're dealing with a markup event stream for every item in the iterable, we now check only the first item, and treat the rest of the iterable depending on whether the first one looks like an event.
Performance optimization for the `genshi.core._ensure` function: instead of checking whether we're dealing with a markup event stream for every item in the iterable, we now check only the first item, and treat the rest of the iterable depending on whether the first one looks like an event.

git-svn-id: 35afe1d183cbd4849519a30d21151995795e8f1d@750 de761a21-4c15-0410-92fa-db90950b6ec0

dag/genshi,dag/genshi,davidfraser/genshi,dag/genshi,davidfraser/genshi,dag/genshi,davidfraser/genshi,davidfraser/genshi