PhantomJS: Munges URL by rewriting scheme and appending prefix

instead of munging the hostname.

Munging the hostname may have unseen effects such as cookies leaking
across domains. This commit hopes to reduce side sideeffects, but it
still affects inline resource relative links and their schemes inherited
from the munged URL instead of the before-munged URL.