Update media URL functions for protocol-relative style.

This is part of a change to core to remove the separate domain for S3
HTTPS images for performance.

:eyeglasses: @Deimos @rram @umbrae