updatersh: Fix updater.sh background mode

updater.sh must run itself on background because NUCI interface does not
handle shell function on background well
These changes include
- new run_backgrounded function
- a little refactor of main flow
- handle rand-sleep mode when running on background
2 jobs for updatersh-fix
in 8 minutes and 41 seconds and was queued for 4 seconds