Moved ServiceWorker registration.

It's now happens on deviceready.