Extend the asset format selection to images, and make it asynchronous.

For forthcoming WebP and JPEG XR support.
Add WebP support.

With fallback, 'natch. If you stick foobar.webp and foobar.png in your
assets, Chrome (and soon Firefox) will prefer to load the webp.