[HttpKernel] fix stripComments() normalizing new-lines

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10227
| License       | MIT
| Doc PR        | 

This makes normalizing new-lines less error-prone
when a string contains multiple new line-lines