Updates to account for changes to the SW spec.

A bit hacky, especially when working around the incomplete `ServiceWorkerGlobal.caches` object. But it does work with Chrome 39 now.