Array-based set implementation.

Using this instead of object-based sets since it allows keeping the
order of items in the set.
Added convenience switchTo function.
Use the shorter switchTo function.
Fixed boolean logic.
First init the UI, then switch to a given pair.
Dynamically generate the UI for the available language pairs.