Add support for online and offline events; make nokia.phone-status return correct connectivity info

This is still a WIP, there's a weird bug in a MIDlet I'm testing that I need to fix.
Do any of the midlets you're testing try to get battery notifications? If so, let's file an issue to add support for them. It should be possible to do so using the Battery API.