Avoid some expensive operations in header expansions
Avoid some expensive operations in header expansions

Basically gather lines as-is during traversal, avoiding allocating
memory for all the lines in headers.

Brings additional performance improvement abut 20%.

tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird