Catch SIGPIPE

Avoids a crash if OpenSSL tries to write to a broken connection with
write().

Obviously OpenSSL really should use send() with MSG_NOSIGNAL, but for
some reason it doesn't. This should probably be considered an OpenSSL
bug, but since in this case we "own" the process, there is no harm in
ignoring the signal.

This is not done with libmpv, because as a library we don't want to mess
with global state. It's also not done if terminal handling is disabled -
this is a bit arbitrary, but I don't care much.
demux_mkv: haali hack: add last frame duration to video length too

From what I can see, only the blockduration of the packet needs to be
added, never the "default duration".
command: add drop_buffers

This command was actually requested on IRC ages ago, but I forgot about
it.

The main purpose is that the decoding state can be reset without issuing
a seek, in particular in situations where you can't seek.

This restarts decoding from the middle of the packet stream; since it
discards the packet buffer intentionally, and the decoder will typically
not output "incomplete" frames until it has recovered, it can skip a
large amount of data.

It doesn't clear the byte stream cache - I'm not sure if it should.
command: dvd: better audio/video recovery on angle switching

Does the same thing as the drop_buffers command. When implementing that
command, it turned out that resetting the higher level playback state
was more effective for achieving smooth recovery.

Untested; I don't even have any DVDs or DVD images with multiple angles.
input: add a prefix to make any binding act on key repeat

The fact that it's a generic command prefix that is parsed even when
using the client API is a bit unclean (because this flag makes sense
for actual key-bindings only), but it's less code this way.
lua: add a way to add repeatable key bindings

For these, autorepeat is enabled.