various upgrade shutdown logic

* refactor the rate-limit shutdown
* add --exit-on-upgrade commandline option
Merge pull request #365 from racker/features/upgrade_restarts

various upgrade shutdown logic
fix compareVersion check
fix undefined variable
cleanup
revert luvit bump
Merge remote-tracking branch 'upstream/master' into windows_installer_test