Merge pull request #197 from cmarcelo/power-event-source

[Power] Share state changed callback between instances
[Power] Keep only one listener

Keeping a list is confusing since we don't really support multiple
listeners. Also done some JS cleanup. This shouldn't change the
behavior.
[Power] Lazily fill defaultScreenBrightness

This avoids all the tests sending a sync message to PowerInstance
without need. It is also a good practice to not do blocking work during
initialization if that could be avoided.
[Power] Send change events only if there's someone listening

Add a new message SetListenToScreenStateChange, from JS to native, that
will be used to tell native that we have a listener. This patch also
ensures that we have a proper value to be used as "old state", by
getting the value at time of listener registration.

One consequence is that after this patch, tizen.power code is not called
at all unless the page uses tizen.power features.

This patch should reduce a lot the errors related to invalid sync
messages, they were caused mostly by those setup messages when running
tests that loaded pages repeatedly.