gstplayer: Improve query duration handling

The duration handling logic is changed to now listen to the
'duration-changed' message to handle duration changes.

However, the duration can only be queried once the pipeline is
prerolled (it's in the PAUSED or the PLAYING state). If that is not
the case, the pipeline will receive an 'async-done' message once it's
prerolled and the duration needs to be queried.

With this new logic it's possible to remove the timeout to query
duration at the start of the stream: if the pipeline is already
prerolled, the duaration query will succeed. If not, the duration will
be queried once an 'async-done' or 'duration-changed' message will be
received.
3 jobs for wip/jfelder/async-duration in 10 minutes and 12 seconds
latest
Status Job ID Name Coverage
  Check
passed #1289951
flake8

00:02:42

passed #1289952
mypy

00:02:26

 
  Build Flatpak
passed #1289953
flatpak
flatpak

00:07:29