Templatize goog.async.Deferred, so that the argument to .callback() can be type checked and inside .addCallback the type of the argument can be inferred.
Templatize goog.async.Deferred, so that the argument to .callback() can be type checked and inside .addCallback the type of the argument can be inferred.

This CL does not change 2 things that could be changed:
(1) Infer the template type from the argument to the .succeed() method. This breaks too many current tap targets and can be done separately.
(2) Force the return type from the callback functions to be {undefined|VALUE|goog.async.Deferred.<VALUE>}. This currently doesn't work, due to a bug in JSCompiler on functions that have their own @template.

A templated goog.async.Deferred object can never change its type (except through casting). This currently isn't enforced, though, in terms of the return value to the addCallback method. Also, when chaining is used the template type is not propagated as it may change after every callback.

-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=50398095

codyebberson/closure-library,wenzowski/closure-library,teppeis/closure-library,neraliu/closure-library,Medium/closure-library,wagjo/closure-library,chone/closure-library,ikabirov/closure-library,closure-library-geeks/closure-library-jp,ominux/closure-library,teppeis/closure-library,ChadKillingsworth/closure-library,kencheung/closure-library,yathit/closure-library,lewistg/closure-library,AlexanderZon/closure-library,redforks/closure-library,federkasten/closure-library,mail-apps/closure-library,Ju2ender/closure-library,JasOXIII/closure-library,moagrius/closure-library,rikuayanokozy/closure-library,Anish2/closure-library,closure-library-geeks/closure-library-jp,gterzian/closure-library,gfredericks/closure-library,ominux/closure-library,beni55/closure-library,beni55/closure-library,sevaseva/closure-library,jvu/closure-library,Aniaf/fkorboukh-js-new,ducklord/closure-library,Dominator008/closure-library,Tinkerforge/tvpl-closure-library,chrisprice/closure-library,vincenta/closure-library,platinumpixs/google-closure-library,AlastairTaft/closure-library,gingerik/closure-library,jupeter/composer-closure-library,manakor/closure-library,Aniaf/fkorboukh-js-new,sunilkumargit/closure-library,teppeis/closure-library.old,metamolecular/closure-library,AlexanderZon/closure-library,manakor/closure-library,neraliu/closure-library,kencheung/closure-library,closure-library-geeks/closure-library-jp,Aniaf/fkorboukh-js-new,teppeis/closure-library,real/closure-library,jooking/closure-library,jvu/closure-library,joeltine/closure-library,Aniaf/fkorboukh-js-new,sevaseva/closure-library,jooking/closure-library,mrourke/closure-library,real/closure-library,chrisprice/closure-library,Tinkerforge/tvpl-closure-library,jvu/closure-library,jooking/closure-library,vlkous/closure-library,platinumpixs/google-closure-library,Dominator008/closure-library,grpbwl/closure-library,ducklord/closure-library,bebbi/closure-library,yathit/closure-library,Anish2/closure-library,Medium/closure-library,igrep/closure-library,chone/closure-library,AlastairTaft/closure-library,gingerik/closure-library,lewistg/closure-library,alexg-dev/closure-library,AlexanderZon/closure-library,sevaseva/closure-library,jupeter/composer-closure-library,vincenta/closure-library,ChadKillingsworth/closure-library,rikuayanokozy/closure-library,nicks/closure-library,nicks/closure-library,google/closure-library,grpbwl/closure-library,bebbi/closure-library,joeltine/closure-library,moagrius/closure-library,sunilkumargit/closure-library,igrep/closure-library,ralic/closure-library,lucidsoftware/closure-library,Luzzifa/closure-library,teppeis/closure-library.old,jhiswin/idiil-closure-library,beni55/closure-library,sunilkumargit/closure-library,jvu/closure-library,platinumpixs/google-closure-library,fivetran/closure-library,metamolecular/closure-library,valerysamovich/closure-library,chone/closure-library,nicks/closure-library,maureknob/blockly-maure,concavelenz/closure-library,ChadKillingsworth/closure-library,bebbi/closure-library,Tinkerforge/tvpl-closure-library,mail-apps/closure-library,Tinkerforge/tvpl-closure-library,manakor/closure-library,Prinhotels/closure-library,jeffbcross/closure-library,kencheung/closure-library,mrourke/closure-library,kencheung/closure-library,alexg-dev/closure-library,alexg-dev/closure-library,AlastairTaft/closure-library,Anish2/closure-library,AlastairTaft/closure-library,gfredericks/closure-library,google/closure-library,concavelenz/closure-library,mmazaheri/closure-library,jhiswin/idiil-closure-library,joeltine/closure-library,nicks/closure-library,rikuayanokozy/closure-library,fivetran/closure-library,grpbwl/closure-library,platinumpixs/google-closure-library,plu83/closure-library,joeltine/closure-library,lewistg/closure-library,jhiswin/idiil-closure-library,maureknob/blockly-maure,jhiswin/idiil-closure-library,gingerik/closure-library,moagrius/closure-library,plu83/closure-library,teppeis/closure-library.old,kangkot/closure-library,google/closure-library,valerysamovich/closure-library,bebbi/closure-library,ikabirov/closure-library,Dominator008/closure-library,mrourke/closure-library,AlexanderZon/closure-library,teppeis/closure-library,kangkot/closure-library,yathit/closure-library,concavelenz/closure-library,nanaze/closure-rhino-fork,lucidsoftware/closure-library,metamolecular/closure-library,beni55/closure-library,Luzzifa/closure-library,Medium/closure-library,vlkous/closure-library,jbnicolai/closure-library,mail-apps/closure-library,vincenta/closure-library,federkasten/closure-library,valerysamovich/closure-library,Prinhotels/closure-library,Medium/closure-library,ralic/closure-library,Prinhotels/closure-library,Dominator008/closure-library,maureknob/blockly-maure,JasOXIII/closure-library,ducklord/closure-library,Ju2ender/closure-library,neraliu/closure-library,sunilkumargit/closure-library,jbnicolai/closure-library,Anish2/closure-library,redforks/closure-library,jbnicolai/closure-library,lewistg/closure-library,jooking/closure-library,mrourke/closure-library,federkasten/closure-library,chone/closure-library,rikuayanokozy/closure-library,Luzzifa/closure-library,gfredericks/closure-library,concavelenz/closure-library,kangkot/closure-library,wagjo/closure-library,wenzowski/closure-library,vlkous/closure-library,nanaze/closure-rhino-fork,lucidsoftware/closure-library,mmazaheri/closure-library,igrep/closure-library,Ju2ender/closure-library,moagrius/closure-library,jupeter/composer-closure-library,codyebberson/closure-library,Luzzifa/closure-library,JasOXIII/closure-library,jeffbcross/closure-library,valerysamovich/closure-library,manakor/closure-library,mmazaheri/closure-library,plu83/closure-library,vlkous/closure-library,mail-apps/closure-library,chrisprice/closure-library,ikabirov/closure-library,google/closure-library,jeffbcross/closure-library,sevaseva/closure-library,ominux/closure-library,redforks/closure-library,wagjo/closure-library,ikabirov/closure-library,neraliu/closure-library,ChadKillingsworth/closure-library,jbnicolai/closure-library,google/closure-library,ralic/closure-library,gterzian/closure-library,ducklord/closure-library,redforks/closure-library,chrisprice/closure-library,gterzian/closure-library,lucidsoftware/closure-library,federkasten/closure-library,fivetran/closure-library,gterzian/closure-library,igrep/closure-library,kangkot/closure-library,real/closure-library,alexg-dev/closure-library,jeffbcross/closure-library,JasOXIII/closure-library,gfredericks/closure-library,ralic/closure-library,Prinhotels/closure-library,yathit/closure-library,gingerik/closure-library,wenzowski/closure-library,nanaze/closure-rhino-fork,grpbwl/closure-library,plu83/closure-library,vincenta/closure-library,Ju2ender/closure-library,codyebberson/closure-library,ominux/closure-library,real/closure-library,codyebberson/closure-library,maureknob/blockly-maure