[connectionagent] fix autoconnect ->cell.

optimize a bit, clean up and remove unneeded code.