Don't parse headers unnecessarily

This is the ROOT6 version of pull request 4958.  It is absolutely necessary to avoid parsing every header, so that on-demand parsing works.  Thie ROOT6 IB builds with this pull request, but many tests fail.  Nonetheless, it will be much easier to fix the failures if this changes in an IB rather than if it is not in an IB.
Please merge as soon as convenient.