x11: avoid obscure behavior when --wid is partially garbage

Cast away the "extra" bits (since apparently Window/XID is always
32 bit unsigned). This is not striclty needed, because you're not
supposed to pass garbage to --wid, just because the upper bits are
possibly not interpreted. But if you do so, this change increases
consistency in behavior and removes a strange behavior that was
thought to be a bug.

Also see github issue #906.
client API: allow calling mpv_terminate_destroy(NULL)

This is an oversight and a bug.

CC: @mpv-player/stable
DOCS/client_api_examples: add a Qt example

This is pretty dumb and extremely basic. The main purpose is
demonstrating how to integrate mpv into the Qt GUI thread.
stream_dvdnav: make sure seeking bounds are within range

libdvdnav returns an error is the seek position is out of range.

CC: @mpv-player/stable

Signed-off-by: wm4 <wm4@nowhere>
stream_dvdnav: free pointer to priv->filename on close

CC: @mpv-player/stable

Signed-off-by: wm4 <wm4@nowhere>
stream_dvdnav: check the length of all titles with dvdnav://longest

The last title was ignored before.

CC: @mpv-player/stable

Signed-off-by: wm4 <wm4@nowhere>