libs: encoder: h265: choose the profile based on allowed list.
libs: encoder: h265: choose the profile based on allowed list.

We can decide the profile in ensure_profile(), based on allowed list
passed by the encode. We also need to check whether the entrypoint is
available. Once it is decided, no need to check the hw entrypoint
them again.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/349>

ceyusa/gstreamer-vaapi,GStreamer/gstreamer-vaapi,ceyusa/gstreamer-vaapi,GStreamer/gstreamer-vaapi