Merge pull request #138 from marsqing/master

self upgrade skeleton and some small fix and refactor
Merge pull request #140 from marsqing/master

merge DEPLOY and UPGRADE_AGENT; some minor cleanup
agent self upgrade refactor[unfinished]