Define media_url for Travis to emulate having a CDN (bug 997942)
cdn_url is automatically set from media_url if it exists (bug 997942)
Fix flaky unit test by mocking what's necessary (bug 997942)