move Ryan's proxy code from client.lua to Connection class

also remove connect_old() method in client.lua
fixes
Merge pull request #97 from virgo-agent-toolkit/songgao/proxy

move Ryan's proxy code from client.lua to Connection class