Fix EZP-21840: unwanted "shebang" line running ezpublish:legacy:script

JIRA: https://jira.ez.no/browse/EZP-21840

Executing a legacy script through php ezpublish/console ezpublish:legacy:script will output the following in the first line:
```#!/usr/bin/env php```
The above should not be displayed, even more so when the scripts are given the '--quiet' option.

This fix does not touch the shebang lines in legacy script, but rather implements an output buffer that removes it.
The buffering should otherwise be "transparent", by using implicit flush.