Move logic for getting bundle URLs to standalone functions.

This will allow sites to fetch a list of URLs for a bundle in case they
need to do things like conditionally load a bundle from JavaScript.