Refactor: libcrmcommon: Allow reusing attrd IPC connections.
Certain functions did not allow reusing connections that the function
also created. Those connections would be destroyed at the end of the
function. Instead, allow passing an api argument that has been created
but not yet initialized. It will be connected, used for the function,
and then returned as-is. It's up to the caller to destroy the object
later.