Fix empty candidate window for IME Extension API.
Fix empty candidate window for IME Extension API.

The problem is that some engines are never deactivated when the engine is switched.
The original IBus spec assumes each engine instance will be created on CreateEngine method and destroyed on Destroy function.
However in the case of Chrome, we switch the engine instance at the next CreateEngine function and no-op for Destroy function.
This is ideally okay because there is only one engine instance.
However ibus-daemon sends "Disable" message *AFTER* CreateEngine function, so Extension IME missed it, this is the root cause.

I changed to calling "Disable" function at the instance switching and it fixes this problem.

BUG=182916
TEST=Manually checked on lumpy.


Review URL: https://chromiumcodereview.appspot.com/12598004

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@187680 0039d316-1c4b-4281-b951-d872f2087c98

Just-D/chromium-1,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,ltilve/chromium,jaruba/chromium.src,hgl888/chromium-crosswalk,markYoungH/chromium.src,jaruba/chromium.src,Just-D/chromium-1,dushu1203/chromium.src,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,ondra-novak/chromium.src,hujiajie/pa-chromium,ChromiumWebApps/chromium,Just-D/chromium-1,dushu1203/chromium.src,Fireblend/chromium-crosswalk,jaruba/chromium.src,dushu1203/chromium.src,timopulkkinen/BubbleFish,Chilledheart/chromium,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,hujiajie/pa-chromium,ChromiumWebApps/chromium,dushu1203/chromium.src,Chilledheart/chromium,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,anirudhSK/chromium,ondra-novak/chromium.src,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,anirudhSK/chromium,ltilve/chromium,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,axinging/chromium-crosswalk,patrickm/chromium.src,Just-D/chromium-1,ltilve/chromium,Fireblend/chromium-crosswalk,dednal/chromium.src,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,M4sse/chromium.src,markYoungH/chromium.src,mogoweb/chromium-crosswalk,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,ltilve/chromium,Chilledheart/chromium,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,jaruba/chromium.src,Jonekee/chromium.src,littlstar/chromium.src,ltilve/chromium,Fireblend/chromium-crosswalk,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,ltilve/chromium,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,dushu1203/chromium.src,chuan9/chromium-crosswalk,markYoungH/chromium.src,M4sse/chromium.src,Jonekee/chromium.src,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,littlstar/chromium.src,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,jaruba/chromium.src,ondra-novak/chromium.src,dushu1203/chromium.src,anirudhSK/chromium,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,mogoweb/chromium-crosswalk,Fireblend/chromium-crosswalk,anirudhSK/chromium,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,Jonekee/chromium.src,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium,Just-D/chromium-1,Just-D/chromium-1,chuan9/chromium-crosswalk,dednal/chromium.src,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,Just-D/chromium-1,ChromiumWebApps/chromium,crosswalk-project/chromium-crosswalk-efl,chuan9/chromium-crosswalk,dednal/chromium.src,Jonekee/chromium.src,timopulkkinen/BubbleFish,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,dednal/chromium.src,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,patrickm/chromium.src,mogoweb/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,hujiajie/pa-chromium,Chilledheart/chromium,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,patrickm/chromium.src,timopulkkinen/BubbleFish,dednal/chromium.src,hgl888/chromium-crosswalk,Chilledheart/chromium,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,mogoweb/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,hujiajie/pa-chromium,littlstar/chromium.src,ChromiumWebApps/chromium,ChromiumWebApps/chromium,Jonekee/chromium.src,ondra-novak/chromium.src,axinging/chromium-crosswalk,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,M4sse/chromium.src,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,Chilledheart/chromium,chuan9/chromium-crosswalk,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,dednal/chromium.src,littlstar/chromium.src,anirudhSK/chromium,ltilve/chromium,littlstar/chromium.src,hgl888/chromium-crosswalk,Jonekee/chromium.src,mogoweb/chromium-crosswalk,dushu1203/chromium.src,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,patrickm/chromium.src,Jonekee/chromium.src,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,dednal/chromium.src,M4sse/chromium.src,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,dednal/chromium.src,dednal/chromium.src,markYoungH/chromium.src,hgl888/chromium-crosswalk,littlstar/chromium.src,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,dednal/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,axinging/chromium-crosswalk,markYoungH/chromium.src,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,M4sse/chromium.src,littlstar/chromium.src,Just-D/chromium-1,dushu1203/chromium.src,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,dednal/chromium.src,timopulkkinen/BubbleFish,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,timopulkkinen/BubbleFish,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,crosswalk-project/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,timopulkkinen/BubbleFish,ondra-novak/chromium.src,chuan9/chromium-crosswalk,ondra-novak/chromium.src,dushu1203/chromium.src