Fix issues of the "previous_engine" hotkey.
Fix issues of the "previous_engine" hotkey.

Check global_previous_engine_name when the previous engine is requested and rewrite it if necessary.
This change ensures that the "previous_engine" hotkey (Ctrl+space on Chrome OS) always works
whenever two or more engines are preloaded.

Currently, Ctrl+space could become NOP by the following scenarios (http://crosbug.com/6609):

(1)
1. preload engines A, B, C.
2. switch to A.
3. switch to B.
4. at this point, ctrl+space works fine. It selectes A and B alternately.
5. switch to A.
6. remove B from the preloaded engline list.
7. at this point, ctrl+space suddenly becomes NOP although C is still preloaded.
This is because the callback function of ctrl+space detects
global_previous_engine_name (i.e. B) is removed and automatically selects A (not
C) as a global_previous_engine_name.

(2)
1. preload engines A, B.
2. switch to A.
3. switch to B.
4. at this point, ctrl+space works fine. It selectes A and B alternately.
5. switch to A.
6. remove B from the preloaded engline list.
7. press ctrl+space several times, confirm that nothing happens (this is
expected since only one engine, A, is preloaded).
8. preload additional engine, C.
9. at this point, ctrl+space is still NOP although two engines, A and C, are
preloaded.

ueno/ibus,Keruspe/ibus,phuang/ibus,phuang/ibus,Keruspe/ibus,ueno/ibus,fujiwarat/ibus,fujiwarat/ibus,ueno/ibus,Keruspe/ibus,Keruspe/ibus,j717273419/ibus,phuang/ibus,ueno/ibus,ibus/ibus,ibus/ibus,j717273419/ibus,ibus/ibus,j717273419/ibus,ibus/ibus,ueno/ibus,j717273419/ibus,phuang/ibus,fujiwarat/ibus,fujiwarat/ibus