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

Conflicts:
	lib/base.php
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 #9776 from owncloud/backport-9738-stable6

Backport 9738 stable6