fix #606 html select: better synchronize value and selectedIndex

In case both value and selectedIndex are bound to the HTML select,
initialise them properly in special cases (NotANumber, null, out of the boundaries)