Refine the cc client relevant code

As more and more parts in Admin-UI will use CC rest api, need to extract
the CC client relevant code into an independent lib as base code, this
patch includes the refine of utils and CC relevant code to achieve this goal.