[connectionagent] support connman 1.21 and refactor