Clip worklist_selection to the worklist size
Clip worklist_selection to the worklist size

When the work list changes with the city dialog open it is rebuilt
with the new one, but the selection still contains the old indexes.
That causes problems later when triggering actions based on the
selection and referencing and undefined item.

We make sure that we have no indexes out of bounds. What we are not
doing is guessing what the change was. We still keep the valid indexes,
which now may be pointing to a different item, but that change is also
shown in the UI. That is, if we had items A, B, C and D with B and D
selected (1,3), and the city finishes whatever it was building when
the turn changes, the worklist changes to B, C and D, and index 3 is
removed from the selection leaving C (not B and D) selected. That is
also the selection reflected in the UI.

Closes #123

andreasrosdal/freeciv-web,andreasrosdal/freeciv-web,andreasrosdal/freeciv-web,andreasrosdal/freeciv-web,andreasrosdal/freeciv-web