Added appcache event listeners

Appcache still disabled.  Added event listeners to prevent app updates
from taking two user reloads to propagate. On user (re)load, appcache
updates are downloaded as usual, but now the cache is swapped and the
page is automatically reloaded.