[widgetservice][utils] Common implementation for ListenerManager.
I extracted broken ListenerManager implementation from widgetservice module
fixed it, and placed it inside utils_api.js module as CommonListenerManager.
This implementation has customizable behavior if removeListener cannot find
listener for given id, so you can throw exception, do nothing, or return
error object.
[Verification]
Test usage of this CommonListenerManager implementation is provided in this
commit using widgetservice widgetStateChangeListener which I replaced.
Manual tests were performed to verify that the implementation behaves as
expected.
Change-Id: I0e18e091b9ad8cacc685663c65f3358cc022188d