[SysApps] Add a wrapper to make Promise work with Internal Extensions callbacks
[SysApps] Add a wrapper to make Promise work with Internal Extensions callbacks

Promises are a really nice fit with the Internal Extensions callbacks, because
they are single shot (you fire it once and forget about it).

We just need to create a wrapper around it with a "protocol" so we can
properly call fulfill() or reject() depending on the message we get from
the native backend.

The Internal Extension callback system will handle keep tracking of the mapping
between callback handlers in the native side and pending Promises in the
JavaScript shim automatically.

baleboy/crosswalk,jpike88/crosswalk,PeterWangIntel/crosswalk,mrunalk/crosswalk,myroot/crosswalk,ZhengXinCN/crosswalk,leonhsl/crosswalk,zeropool/crosswalk,hgl888/crosswalk,tomatell/crosswalk,dreamsxin/crosswalk,mrunalk/crosswalk,marcuspridham/crosswalk,fujunwei/crosswalk,axinging/crosswalk,zeropool/crosswalk,tomatell/crosswalk,marcuspridham/crosswalk,chuan9/crosswalk,siovene/crosswalk,rakuco/crosswalk,baleboy/crosswalk,jondong/crosswalk,crosswalk-project/crosswalk,chuan9/crosswalk,tomatell/crosswalk,crosswalk-project/crosswalk,seanlong/crosswalk,fujunwei/crosswalk,baleboy/crosswalk,zeropool/crosswalk,XiaosongWei/crosswalk,TheDirtyCalvinist/spacewalk,myroot/crosswalk,pk-sam/crosswalk,rakuco/crosswalk,minggangw/crosswalk,darktears/crosswalk,xzhan96/crosswalk,zeropool/crosswalk,leonhsl/crosswalk,chuan9/crosswalk,fujunwei/crosswalk,lincsoon/crosswalk,fujunwei/crosswalk,zliang7/crosswalk,hgl888/crosswalk-efl,hgl888/crosswalk-efl,lincsoon/crosswalk,xzhan96/crosswalk,XiaosongWei/crosswalk,jondong/crosswalk,DonnaWuDongxia/crosswalk,darktears/crosswalk,siovene/crosswalk,qjia7/crosswalk,pk-sam/crosswalk,hgl888/crosswalk,crosswalk-project/crosswalk-efl,minggangw/crosswalk,bestwpw/crosswalk,ZhengXinCN/crosswalk,chinakids/crosswalk,minggangw/crosswalk,stonegithubs/crosswalk,DonnaWuDongxia/crosswalk,jondwillis/crosswalk,lincsoon/crosswalk,chuan9/crosswalk,hgl888/crosswalk,zeropool/crosswalk,seanlong/crosswalk,siovene/crosswalk,fujunwei/crosswalk,leonhsl/crosswalk,RafuCater/crosswalk,alex-zhang/crosswalk,hgl888/crosswalk-efl,weiyirong/crosswalk-1,crosswalk-project/crosswalk-efl,jpike88/crosswalk,darktears/crosswalk,tomatell/crosswalk,rakuco/crosswalk,pk-sam/crosswalk,stonegithubs/crosswalk,chinakids/crosswalk,PeterWangIntel/crosswalk,zliang7/crosswalk,mrunalk/crosswalk,lincsoon/crosswalk,tomatell/crosswalk,Bysmyyr/crosswalk,leonhsl/crosswalk,darktears/crosswalk,dreamsxin/crosswalk,baleboy/crosswalk,RafuCater/crosswalk,chinakids/crosswalk,chuan9/crosswalk,jondong/crosswalk,myroot/crosswalk,axinging/crosswalk,crosswalk-project/crosswalk-efl,lincsoon/crosswalk,rakuco/crosswalk,crosswalk-project/crosswalk,ZhengXinCN/crosswalk,chinakids/crosswalk,Pluto-tv/crosswalk,XiaosongWei/crosswalk,stonegithubs/crosswalk,PeterWangIntel/crosswalk,jpike88/crosswalk,heke123/crosswalk,hgl888/crosswalk,Bysmyyr/crosswalk,Bysmyyr/crosswalk,jondong/crosswalk,lincsoon/crosswalk,Bysmyyr/crosswalk,weiyirong/crosswalk-1,zliang7/crosswalk,hgl888/crosswalk,xzhan96/crosswalk,heke123/crosswalk,weiyirong/crosswalk-1,lincsoon/crosswalk,axinging/crosswalk,Pluto-tv/crosswalk,hgl888/crosswalk-efl,XiaosongWei/crosswalk,axinging/crosswalk,baleboy/crosswalk,myroot/crosswalk,PeterWangIntel/crosswalk,bestwpw/crosswalk,stonegithubs/crosswalk,stonegithubs/crosswalk,TheDirtyCalvinist/spacewalk,baleboy/crosswalk,huningxin/crosswalk,Bysmyyr/crosswalk,siovene/crosswalk,TheDirtyCalvinist/spacewalk,DonnaWuDongxia/crosswalk,alex-zhang/crosswalk,dreamsxin/crosswalk,marcuspridham/crosswalk,marcuspridham/crosswalk,seanlong/crosswalk,darktears/crosswalk,chuan9/crosswalk,RafuCater/crosswalk,heke123/crosswalk,mrunalk/crosswalk,weiyirong/crosswalk-1,jondwillis/crosswalk,amaniak/crosswalk,jondwillis/crosswalk,amaniak/crosswalk,huningxin/crosswalk,alex-zhang/crosswalk,xzhan96/crosswalk,jpike88/crosswalk,marcuspridham/crosswalk,seanlong/crosswalk,jondong/crosswalk,pk-sam/crosswalk,amaniak/crosswalk,heke123/crosswalk,heke123/crosswalk,DonnaWuDongxia/crosswalk,marcuspridham/crosswalk,darktears/crosswalk,RafuCater/crosswalk,hgl888/crosswalk-efl,jondwillis/crosswalk,lincsoon/crosswalk,pk-sam/crosswalk,Pluto-tv/crosswalk,heke123/crosswalk,chuan9/crosswalk,seanlong/crosswalk,axinging/crosswalk,dreamsxin/crosswalk,rakuco/crosswalk,chinakids/crosswalk,RafuCater/crosswalk,tedshroyer/crosswalk,crosswalk-project/crosswalk,baleboy/crosswalk,crosswalk-project/crosswalk-efl,shaochangbin/crosswalk,minggangw/crosswalk,pk-sam/crosswalk,darktears/crosswalk,myroot/crosswalk,ZhengXinCN/crosswalk,ZhengXinCN/crosswalk,alex-zhang/crosswalk,pk-sam/crosswalk,xzhan96/crosswalk,huningxin/crosswalk,ZhengXinCN/crosswalk,bestwpw/crosswalk,jondong/crosswalk,marcuspridham/crosswalk,minggangw/crosswalk,jondwillis/crosswalk,tedshroyer/crosswalk,Pluto-tv/crosswalk,huningxin/crosswalk,alex-zhang/crosswalk,alex-zhang/crosswalk,rakuco/crosswalk,zliang7/crosswalk,shaochangbin/crosswalk,hgl888/crosswalk,huningxin/crosswalk,RafuCater/crosswalk,marcuspridham/crosswalk,fujunwei/crosswalk,weiyirong/crosswalk-1,jondwillis/crosswalk,dreamsxin/crosswalk,ZhengXinCN/crosswalk,mrunalk/crosswalk,minggangw/crosswalk,PeterWangIntel/crosswalk,amaniak/crosswalk,rakuco/crosswalk,RafuCater/crosswalk,tedshroyer/crosswalk,heke123/crosswalk,crosswalk-project/crosswalk,jondwillis/crosswalk,zliang7/crosswalk,crosswalk-project/crosswalk-efl,amaniak/crosswalk,Pluto-tv/crosswalk,shaochangbin/crosswalk,zliang7/crosswalk,zeropool/crosswalk,alex-zhang/crosswalk,xzhan96/crosswalk,stonegithubs/crosswalk,TheDirtyCalvinist/spacewalk,crosswalk-project/crosswalk-efl,shaochangbin/crosswalk,TheDirtyCalvinist/spacewalk,tedshroyer/crosswalk,PeterWangIntel/crosswalk,baleboy/crosswalk,shaochangbin/crosswalk,jpike88/crosswalk,Pluto-tv/crosswalk,zliang7/crosswalk,bestwpw/crosswalk,weiyirong/crosswalk-1,Pluto-tv/crosswalk,hgl888/crosswalk,dreamsxin/crosswalk,DonnaWuDongxia/crosswalk,Bysmyyr/crosswalk,tedshroyer/crosswalk,crosswalk-project/crosswalk,stonegithubs/crosswalk,mrunalk/crosswalk,XiaosongWei/crosswalk,leonhsl/crosswalk,qjia7/crosswalk,hgl888/crosswalk-efl,myroot/crosswalk,chinakids/crosswalk,jpike88/crosswalk,Bysmyyr/crosswalk,DonnaWuDongxia/crosswalk,axinging/crosswalk,tomatell/crosswalk,crosswalk-project/crosswalk-efl,xzhan96/crosswalk,axinging/crosswalk,jpike88/crosswalk,TheDirtyCalvinist/spacewalk,siovene/crosswalk,crosswalk-project/crosswalk,tedshroyer/crosswalk,siovene/crosswalk,minggangw/crosswalk,minggangw/crosswalk,darktears/crosswalk,fujunwei/crosswalk,qjia7/crosswalk,zliang7/crosswalk,huningxin/crosswalk,rakuco/crosswalk,jondong/crosswalk,qjia7/crosswalk,amaniak/crosswalk,leonhsl/crosswalk,bestwpw/crosswalk,tomatell/crosswalk,jondong/crosswalk,xzhan96/crosswalk,leonhsl/crosswalk,hgl888/crosswalk-efl,DonnaWuDongxia/crosswalk,XiaosongWei/crosswalk,dreamsxin/crosswalk,crosswalk-project/crosswalk,tedshroyer/crosswalk,Bysmyyr/crosswalk,weiyirong/crosswalk-1,heke123/crosswalk,siovene/crosswalk,XiaosongWei/crosswalk,amaniak/crosswalk,bestwpw/crosswalk,hgl888/crosswalk,bestwpw/crosswalk,shaochangbin/crosswalk,qjia7/crosswalk,zeropool/crosswalk,seanlong/crosswalk,PeterWangIntel/crosswalk,qjia7/crosswalk