VA encoders, at reconfiguration, have to check if the rate-control was changed
by the user, but since user parameters setting are in another thread, the
comparison was racy.
This patch locks the object to compare the current rate-control with the one set
by the user.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9480>