Make credentials_factory a bit nicer

The helpers to get parameters for the credential providers were set
up some time ago but not updated anymore, so we have now parameters
passed in get_credentials_provider directly, and some obtained
through the helpers.

Fixing this and adding some docstring. This work is in preparation
to make the module stable for plugins, so that it can be used
by test.py.

Change-Id: Ifee212277e8c1282a54b5443a51531ff731be879
2 files changed