Issue #17: Fix the "theme" setter so that the "themeSelectionChanged" event is dispatched.

Also update the value of the "selectedThemeValue" property before the event is dispatched and only if the new theme is valid.