IW: Fix the protocol for the tangram sources

Currently we always assume a http protocol for our source urls. This
commit adds a function that detects the protocol that the page is
current using and uses that to build the urls.

I left alone the urls were it did not seem necessary to modify (ie
localhost).