Update the battery example to match the spec

Uses the `navigator.getBattery()` promise when available instead of the deprecated `navigator.battery`
Merge pull request #54 from leops/master

Update the battery example to match the spec