Cli: Move pki command funactionality into PkiUtility class

Preparing for usage in setup agent cli command.

refs #7423