[ticket/11534] Check remote avatar content type if possible

This should make sure that error pages like 404 or 503 pages are not treated
as remote avatar images.

PHPBB3-11534
Merge pull request #1819 from marc1706/ticket/11534

[ticket/11534] Check remote avatar content type if possible