input: fix behavior if there are actually key up events

Wayland is the only backend that actually sends per-key key up events
(the X11 one just sends MP_INPUT_RELEASE_ALL for simplicity). Handling
was broken with Wayland, and each key event was interpreted twice, once
on key down and once on key up.

This commit should fix it.
input: require VOs to send key up events, redo input key lookup

Making key up events implicit was sort-of a nice idea, but it's too
tricky and unreliable and makes the key lookup code (interpret_keys())
hard to reason about. See e.g. previous commit for subtle bugs and
issues this caused.

Make key-up events explicit instead. Add key up events to all VOs.
Any time MP_KEY_STATE_DOWN is used, the matching key up event must
use MP_KEY_STATE_UP.

Rewrite the key lookup code. It should be simpler and more robust now.
(Even though the LOC increases, because the new code is less "compact".)
cache: fix per-block metadata memory leak
core: update metadata during playback, allow streams to export metadata

STREAM_CTRL_GET_METADATA will be used to poll for streamcast metadata.
Also add DEMUXER_CTRL_UPDATE_INFO, which could in theory be used by
demux_lavf.c. (Unfortunately, libavformat is too crappy to read metadata
mid-stream for mp3 or ogg, so we don't implement it.)
stream_lavf: request and read streamcast/ICY metadata

Requires recent ffmpeg git, otherwise will do nothing.
command: add some playlist manipulation commands

playlist_remove and playlist_move.
core: remove mp_fifo indirection

For some reason mp_fifo specifically handled double clicks, and other
than that was a pointless wrapper around input.c functionality.

Move the double click handling into input.c, and get rid of mp_fifo. Add
some compatibility wrappers, because so much VO code uses these
functions. Where struct mp_fifo is still used it's just a casted
struct input_ctx.
core: cleanup more mp_fifo leftovers

Now only the OSX and Wayland parts are using this.
wayland: implement MOUSE_LEAVE
wayland: remove mp_fifo
wayland: remove unused members
wayland: fix typo
cocoa: remove usage of mp_fifo

Update Cocoa parts to remove usage of the mp_fifo internal API to send events
to the core and use the input context directly. This is to follow commits the
work in commits 70a8079c and d603e73c.
wayland: remove mp_fifo header
core: remove mp_fifo leftovers
stream: make eof flag more consistent

When reading something successfully, the eof flag should never be 1, so
clear it in these situations. The eof flag will be set properly on the
next read call.
playlist: don't add entries in reverse

The entries were always added after the insertion point - but that
means the entries are appended in reverse order. So update the
insertion point on each entry.

Regression introduced by commit 5f664d7.
dither: don't use long double

This fixes compilation with broken libcs, like on Cygwin. C99
absolutely requires long double and associated functions like expl,
even if long double is double. But newlib (used by cygwin) omits
declaration for these if long double is equivalent to double.

The extra precision is not needed here, so remove it to make life
easier for the single person using mpv with cygwin.