w2grid.js: local search refactoring
w2grid.js: local search refactoring

Little refactoring. There should be no behaviour change with this
patch, just code moving around. This is required in preparation to the
next patches in this serie.

Ebiroll/w2ui,vitmalina/w2ui,agzamovr/w2ui,Connum/w2ui,fosfozol/w2ui,fosfozol/w2ui,mpf82/w2ui,Ebiroll/w2ui,aadrian/w2ui,fosfozol/w2ui,cristianofx/w2ui,vitmalina/w2ui,Connum/w2ui,aadrian/w2ui,ceedriic/w2ui,cristianofx/w2ui,aadrian/w2ui,Connum/w2ui,cristianofx/w2ui,Connum/w2ui,Connum/w2ui,aadrian/w2ui,ceedriic/w2ui,ceedriic/w2ui,ceedriic/w2ui,agzamovr/w2ui,mpf82/w2ui,vitmalina/w2ui,Connum/w2ui,cristianofx/w2ui,mpf82/w2ui,vitmalina/w2ui,Ebiroll/w2ui,fosfozol/w2ui,agzamovr/w2ui,aadrian/w2ui,vitmalina/w2ui,Ebiroll/w2ui,Connum/w2ui,agzamovr/w2ui,ceedriic/w2ui,Ebiroll/w2ui,agzamovr/w2ui,Ebiroll/w2ui,cristianofx/w2ui,vitmalina/w2ui,agzamovr/w2ui,cristianofx/w2ui,mpf82/w2ui,fosfozol/w2ui,mpf82/w2ui,fosfozol/w2ui,ceedriic/w2ui,ceedriic/w2ui,mpf82/w2ui,cristianofx/w2ui,Ebiroll/w2ui,aadrian/w2ui,fosfozol/w2ui,aadrian/w2ui,vitmalina/w2ui,agzamovr/w2ui,mpf82/w2ui