Refactoring to make single-layer query a special case of multi-layer query.

This way, no need for a separate searchXresults/toggleX/onGetXfeatureinfo.
While here use Ext.each and Ext.iterate instead of plain for loops.

Results display is a bit broken (tab handling/adding is weird and populate()
doesnt target the proper tab) but this will be worked on now.

Shrinks the diff against master for readability.