Add a cache for `looks_like_xml` and limit it to the first thousand bytes, as the regex has a tendency to go off into the woods when fed non-xml data.
Add a cache for `looks_like_xml` and limit it to the first thousand bytes, as
the regex has a tendency to go off into the woods when fed non-xml data.

--HG--
branch : trunk

nex3/pygments,nex3/pygments,nex3/pygments,nex3/pygments,nex3/pygments,nex3/pygments,nex3/pygments,nex3/pygments,nex3/pygments,nex3/pygments,nex3/pygments