Bug 824551 - Always display the low power window when the battery level ...

...go below 10%, but only once

- display only once the notification
- hide it as soon as we plug the charger
- display it again when we go above the threshold, and then go down again
- display it again when we unplug the charger, even if we didn't go up the
  threshold
- display it at init if the battery level is low
- added a test file, and had to change some things in BatteryManager to make
  this possible. Most notably, the navigator.battery object is now stored in a
  property so that we can change it in the test. Also, some properties are now
  initialized in init().