Prevent V8 from deleting BatteryManager when listeners are attached.

Add a hasPendingActivity() event to prevent the BatteryManager V8
object from being garbage collected when event listeners are attached.
This is required when no reference to the battery is explicitly stored
in the script, as illustrated by the included layout test.

BUG=

Review URL: https://codereview.chromium.org/432853002

git-svn-id: svn://svn.chromium.org/blink/trunk@179450 bbb929c8-8fbe-4397-9dbb-9b2b20218538