If gss_add_cred() is called with no input_cred_handle, it creates a
new credential with one element. At the end of the function, use the
created credential as the output container, rather than creating a
second one and leaking the first.
Add a test program for gss_add_cred() and run it.
(cherry picked from commit 9e32161dc307a323fd36fd59e252583fe7b90526)