Initial cut of the prefetch sample.

@kenjibaheux @jakearchibald @slightlyoff

Here's my initial attempt at the prefetch SW sample, closing #29. It could use some additional comments/explanatory text, but I wanted to get some feedback on the actual code.

It uses the native Cache API, currently only available in the latest Chrome Canary build. (Woo! No polyfills!) Since `cache.addAll()` isn't yet implemented natively, it performs multiple `fetch()` + `cache.put()` operations.

You can theoretically see a live demo of this code at https://rawgit.com/jeffposnick/samples/sw-prefetch/service-worker/prefetch/index.html but I'm in the process of figuring out why it doesn't work from there (`TypeError: Failed to fetch` for all `fetch()` requests), while it does work when accessed via http://localhost:8000.
Would it overcomplicate this to wrap this up in a function? Like:

function waitUntilInstalled(registration) {
  return new Promise(function(resolve, reject) {
    if (!registration.installing) {
      resolve();
      return;
    }
    registration.installing.addEventListener('statechange', function(e) {
      if (e.target.state == 'installed') {
        resolve();
      }
      // (could also detect conditions to reject here)
    });   
  });
}

then your example becomes more fluent:

waitUntilInstalled(registration).then(showFilesList);

and you can combine it with registration:

navigator.serviceWorker.register(...)
  .then(waitUntilInstalled)
  .then(showFilesList);
  .catch(... "Something went wrong" stuff ...);