[ticket/12458] Apply Squiz.WhiteSpace.SuperfluousWhitespace.* to legacy code

* There MUST NOT be trailing whitespace at the end of lines.
* There MUST NOT be whitespace before the first content of a file.
* There MUST NOT be whitespace after the last content of a file.
* Functions MUST NOT contain multiple empty lines in a row.

https://tracker.phpbb.com/browse/PHPBB3-12458