Clean up the JavaScript example

This brings the example much closer to current discussions. This does not yet take into account the idea of moving pushRegistrationManager to ServiceWorkerRegistration as I think Peter had some questions about that.

This fixes issue #17.
Since this is an example, please annotate why it would be good practice for a user to log |e| here.