[HttpFoundation] Automatically add required headers for instant page rendering without wa...

...iting of script die.

Without this patch browser waiting until script die before start rendering page.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -