Better support for jsbin running under a URL prefix

A few of the URLs are missing `{{root}}` or other URL prefixes, which causes failure when running with `url.prefix` configured.

Some of these changes are the non-controversial bits from #1450. I'd be willing to take that out and treat it as a separate PR if it needs further discussion.