Fix the "addHeader($tag, $attributes, $text)" methods to not ignore the $text parameter

Rebased version of https://github.com/owncloud/core/pull/4727

cc @DeepDiver1975