Clarify CertificateInfo ownership and fix memleaks
Use the power of unique_ptr to ensure our heap allocated CertificateInfo is always cleaned up.
Cleanup only happened correctly in some of the cases.
In order to use unique_ptr, I also had to change the container types from Qt types to std types.