Deduplicate user/password extraction from alternative HTTP headers.
Extract Auth Header logic into new function handleAuthHeaders().
Remove uneeded `strip_tags`

This `strip_tags` seems to be completely unneeded and will cause problems with passwords containing stripped characters. (e.g. `<` or `>`)

Needs https://github.com/owncloud/core/pull/9735 to be merged first.
Merge pull request #9775 from owncloud/backport-9738-stable7

Backport 9738 stable7