gcr-trust: Fix a potential NULL pointer dereference

The error handling in perform_add_pinned_certificate() didn’t allow for
error to be NULL, but it could easily have been NULL since
perform_add_pinned_certificate() is called from public functions with
GError arguments.

Rework the error handling to use a local GError and propagate it to the
caller. This should prevent crashes if error is NULL.

Found by scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=719545