validate-utils: Only modify structure fields that really need updates

This avoids memory corruption in users of that structure which
were (rightfullly) assuming static fields (such as name) wouldn't
change. Without this, they would be using strings which will have been freed in
the meantime.

Part-of: <gstreamer/gst-devtools!253>
35 jobs for !253 with backport-mr-252-into-1.18-structure-safe in 44 minutes and 3 seconds (queued for 3 seconds)
merge request