Changed goog.events key type (listen/listenOnce return value,
unlistenByKey param) to a typedef. It is currently a no-op
(?number), but this allows for incremental cleanup of codebase
to prepare for changing the type to an Object in the future.

I spent a few hours looking at existing code
and fixed most of the breakages (i.e. this is actually
tractable). While doing that, I also tried to do collateral
cleanups, such as using the key in goog.isNumber, changing
default value from 0 to null, replacing if (key != 0) with if
(key). I think there is a good chance that we can make
goog.events return a key object in near future.

R=gboyer,nicksantos
DELTA=13 (8 added, 0 deleted, 5 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=6139


git-svn-id: http://closure-library.googlecode.com/svn/trunk@2439 0b95b8e8-c90f-11de-9d4f-f947ee5921c8

Add isImplementedBy/addImplementation to
goog.events.Listenable to be able to perform runtime check as
to whether an instance is a listenable or not. Make
goog.events.EventTarget call addImplementation.

R=gboyer
DELTA=76 (76 added, 0 deleted, 0 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=6140


git-svn-id: http://closure-library.googlecode.com/svn/trunk@2440 0b95b8e8-c90f-11de-9d4f-f947ee5921c8