player: add a metadata listener API
And use the loudness measurement as a first use case.
The main difference between metadata listeners the player listeners are:
- The information returned by metadata events is mainly useful for the UI, it
should not be used to control the player.
- It's not possible to call or lock the player from metadata events
- Registering a metadata could cost some CPU cycle since it may spawn a
measurement filter to get the requested metadata. Such cost should be
explained in the comment of vlc_player_metadata_option enum.
Some player events could be moved to metadata events, like the statistics one.