m_option: make defval const

There's really no reason why it shouldn't.
m_option: add missing copy callback for some option types

One reaosn for this is that this broke proper handling of .defval, since
m_option_copy did nothing for these option types.
vo_vdpau: allow setting colorkey

Formally, this sets the "background color" of the presentation queue.
But in practice, this color is also used as colorkey.

This commit doesn't change the VDPAU default yet.
vo_vdpau: use color close to black as default colorkey (instead of green)

The VDPAU default colorkey, although it seems to be driver specific, is
usually green. This is a pretty annoying color, and you usually see it
briefly (as flashes) if the VDPAU window resizes.

Change it to some shade of black. The new default color is close to what
MPlayer picks as colorkey (and apparently it worked well for them):

    VdpColor vdp_bg = {0.01, 0.02, 0.03, 0};

Since our OPT_COLOR can set 8 bit colors only, we use '#020507' instead,
which should be the same assuming 8 bit colors.

Obviously, you can't use black, because black is a way too common color,
and would make it too easy to observe the colorkey effect when e.g.
moving a terminal with black background over the video window.
command: allow seek to "chapter -1"

This will seek to the start of the file regardless of whether the first real
chapter starts there or not.
command: more intuitive chapter seek behavior

If close to chapter start, skipping back goes to previous chapter (no change).
If more than <threshold> seconds in, skipping back will now go to the beginning
of the current chapter instead.

The threshold is set by the new option --chapter-seek-threshold and defaults to
5 seconds.  A negative value disables the new functionality.
mplayer: don't make restored options from quit_watch_later per-file local

Consider:

    mpv file1.mkv file2.mkv

and file1.mkv is restored from an earlier session when quit_watch_later
was used. Then all restored options were reset when file2.mkv is played,
even if the user changed them during playback. This affects for example
the fullscreen setting.

Make it so that after finishing a resumed file, the previously restored
settings are not reset again. (Which means only resuming will forcefully
overwrite the settings.)
vo_vdpau: remove unused variable

It was used to manage video surface in the software decoding path, but
now surface management shares the code with hardware decoding.
vo_vdpau: fix screenshots if panscan is used

When panscan was used, i.e. the video is cropped to make the video fill
the screen if video and screen aspects don't match, screenshots
contained only the visible region of the source video, stretched to
original video size.
vo_vdpau: add RGB support

Apparently this was dropped some years ago, but judging from MPlayer's
handling of this, the original code wasn't so great anyway. The new
code handling clearing of panscan borders correctly, and integrates
better with the YUV path. (Although the VDPAU API sure makes this
annoying with its separate surface types for RGB.)

Note that we create 5 surfaces for some reason - I don't think this
makes too much sense (because we can't use the deinterlacer with RGB
surfaces), but at least it reduces the amount of differences with
the YUV code path.

Clearing the borders is done by drawing a single black pixel over the
window. This sounds pretty dumb, but it appears to work well, and
there is no other API for that. (One could try to use the video mixer
for this purpose, since it has all kinds of features, including
compositing multiple RGBA surfaces and clearing the window background.
But it would require an invisible dummy video surface to make the
video mixer happy, and that's getting too messy.)
Merge branch 'master' into lua_experiment
add log functions for scripts, make osc use them

Didn't test them all, there may be bugs.
move functions into a table