Bug 970879 - Prevent redundant listeners from being registered during testing

- Refactored the WapPushManager object to not use bound functions for
  event listeners
- Modified the unit-tests to improve control over the document visibility