Remove AppCache listeners properly

We should specify the function that we're removing as a listener.

This should properly fix #111.

/cc @hampelm