add more tests for mock_httpd
fix check for jpeg magic bytes
(cherry picked from commit 8ee8756dc06cb409650958224f58adf0806c1942)

Conflicts:

	mapproxy/test/image.py
do not open cascaded responses when image format matches
(cherry picked from commit a8194f198b30d94833d03c900e5faa36aed22ef8)

Conflicts:

	mapproxy/image/__init__.py
fixed encoding in basic_auth_value helper