change in order of first run & xbmc-loaded event emit as
for new installs with welcome screen event wasn't emitted until window was closed

code cleanup in upgrade.py