Fixed enum values appearing correct when not.

The drop down 'select' element would always pick one of the available
values, even when the underlying value wasn't set to that. This happens
when creating a new widget -- some value, e.g. device, is set to
nothing, but the UI would show a valid device, because it always shows a
valid value. To fix this, there is now an 'empty' entry in the drop
down, which is selected if the value doesn't match.

Also, we now evaluate the options list before setting the value. That
means that when setting the value the options are already in the list,
so it actually does something.