Overhaul the ESI parser in light of #433 and the prospect of future
addition of features to the ESI code.
The particular situation in #433 arises because a XML comment is not
bounded in length, the same way as an <esi:include...> element naturally
is. This opens the window for trouble when large sections of XML is
commented out for some reason or another.
Bite the bullet and create a "storage-pointer" consisting of a pointer
to a storage segment and a pointer into that segment.
Add a main-loop which uses these pointers to walks over the entire
object, looking for stuff we care about, and handle each appropriately.
In addition to coping properly with the situation in #433, this code is
also close to 100 lines shorter and has a more logical structure.
The downside is that it is isn't quite as memory-access-alergic as the
previous version. (I challenge anybody to measure the effect of this.)
Fixes: #433
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3575
d4fa192b-c00b-0410-8231-
f00ffab90ce4