VF: replace uses of vf_get_image() with new functions

Switch all filters to use the new functions introduced in the previous
commit. This is all about replacing vf_get_image() calls.

vf_pullup.c possibly contains some non-sense code. It's evident that its
DR code never really worked (get_image is commented out), and it's not
really clear to me whether the inactive code (below the "FIXME") is
actually needed, and whether the filter is buggy, always was buggy, or
actually works fine.

vf_softpulldown.c had a bug: it assumed vf_next_put_image() would
basically copy the image, and that the image data could be overwritten
when returning from this call. This is not true at all, the following
situations can require the image (metadata + pixel data) to live longer:
- Most VOs "queue" one frame until it's actually known that the frame
  will be displayed and not discarded (or something like this). See how
  vo_draw_image() and vo_new_frame_imminent() work. vo_vdpau is the only
  VO which actually uploads all frames output by the filter chain
  immediately, because it does its own frame queuing. Consequently, the
  video output with -vf softpulldown was different with vo_vdpau and for
  example vo_opengl.
- Filters which use vf_queue_frame() actually store the put_image() mpi
  to use it later, after put_image() has returned.

There may be more fixed or newly introduced bugs in various filters.
video: remove things related to old DR code

Remove vf_get_image().

Remove some image flags, most of which are now useless or completely
unused.

Remove mp_image.width/height. The w/h members are the ones to use.
width/height were used internally by vf_get_image(), and sometimes for
other purposes. In some cases, using width/height was a bug (like in
vo_image.c), in other cases width/height were the same as w/h anyway.

Remove some other unused mp_image fields.

Some rather messy changes in vo_opengl[_old] to get rid of legacy
mp_image flags and fields. This is left from when vo_gl supported DR.
vf_sub: fix aspect ratio when using margins
mp_image: require using mp_image_set_size() for setting w/h

Setting the size of a mp_image now must be done with
mp_image_set_size(). Do this to guarantee that the redundant fields
(like chroma_width) are updated consistently. Replacing the redundant
fields by function calls would probably be better, but there are too
many uses of them.

Most code actually called mp_image_setfmt(), which did this as well.
This commit just makes things a bit more explicit.
mp_image: always allocate images with aligned strides

mp_image_alloc_planes() allocated images with minimal stride, even if
the resulting stride was unaligned. It was the responsibility of
vf_get_image() to set an image's width to something larger than
required to get an aligned stride, and then crop it.

Rewrite mp_image_alloc_planes() to always allocate with aligned stride.
Add some helper fields to struct mp_image to make implementing this
function easier.

Get rid of IMGFMT_IF09 special handling. This format is not used
anymore. Get rid of swapped chroma plane allocation. This is not used
anywhere, and VOs like vo_xv and vo_direct3d do their own swapping.
mp_image: round chroma width/height up instead of down

Consider 4:2:0 and an uneven image size. For luma, the size was left
uneven, and the chroma size was rounded down. This doesn't make sense,
because chroma would be missing for the bottom/right border.
mp_image: change how palette is handled

According to DOCS/OUTDATED-tech/colorspaces.txt, the following formats
are supposed to be palettized:

    IMGFMT_BGR8
    IMGFMT_RGB8,
    IMGFMT_BGR4_CHAR
    IMGFMT_RGB4_CHAR
    IMGFMT_BGR4
    IMGFMT_RGB4

Of these, only BGR8 and RGB8 are actually treated as palettized in some
way. ffmpeg has only one palettized format (AV_PIX_FMT_PAL8), and
IMGFMT_BGR8 was inconsistently mapped to packed non-palettized RGB
formats too (AV_PIX_FMT_BGR8). Moreover, vf_scale.c contained messy
hacks to generate a palette when AV_PIX_FMT_BGR8 is output. (libswscale
does not support AV_PIX_FMT_PAL8 output.)

Get rid of all of this, and introduce IMGFMT_PAL8, which directly maps
to AV_PIX_FMT_PAL8. Remove the palette creation code from vf_scale.c.
IMGFMT_BGR8 maps to AV_PIX_FMT_RGB8 (don't ask me why it's swapped),
without any palette use. Enabling it in vo_x11 or using it as vf_scale
input seems to give correct results.
vo_caca: accept any stride for output image
video: remove VFCAP_ACCEPT_STRIDE

This wasn't respected anymore. The vf_expand insertion in vf.c did
nothing. Everything must support strides.
VO: replace VFCAP_TIMER with vo->untimed, use for vo_image and vo_lavc

VFCAP_TIMER disables any additional waiting done by mpv in the
playloop. Remove VFCAP_TIMER, but re-use the idea for vo_image and
vo_lavc.

This means --untimed doesn't have to be passed when using --vo=image.
vd: don't overwrite flip option

Also change semantics a bit: --flip inverts the codec flip option,
rather than overriding it.
VF: change API

All filters now implement this uinstead of put_image();

struct mp_image *filter_image(struct vf_instance *vf,
                              struct mp_image *mpi)

Instead of having each filter call put_image() to send an image to the
next filter, the filter_image() function returns the filtered image.

This makes the following rules more explicit:
- the filtered image may be needed even after vf_next_put_image()
  returns
- you can't call vf_next_put_image() multiple times per put_image()