demux: simplify packet resizing

Actually we don't need to resize packets; we just need to make them
shorter.
demux: use av_malloc for packets

Probably "needed" to get the correct alignment, although I'm not aware
of actual breakages or performance issues.

In fact we should probably always just allocate AVPackets, but for now
use the simple fix.
input.conf: make ESC quit when encoding
vd_lavc: use option parser for skip suboptions
options: turn --idx, --forceidx into --index

Also clarify the semantics.

It seems --idx didn't do anything. Possibly it used to change how the
now removed legacy demuxers like demux_avi used to behave. Or maybe
it was accidental.

--forceidx basically becomes --index=force. It's possible that new
index modes will be added in the future, so I'm keeping it
extensible, instead of e.g. creating --force-index.
options: remove use of an inverted option value

Now MPOpts.sub_fix_timing corresponds to the commandline switch
directly, instead of storing the inverted value.
options: remove OPT_FLAG_CONSTANTS

This means use of the min/max fields can be dropped for the flag option
type, which makes some things slightly easier. I'm also not sure if the
client API handled the case of flag not being 0 or 1 correctly, and this
change gets rid of this concern.
command: redo the property type

Instead of absuing m_option to store the property list, introduce a
separate type for properties. m_option is still used to handle data
types. The property declaration itself now never contains the option
type, and instead it's always queried with M_PROPERTY_GET_TYPE. (This
was already done with some properties, now all properties use it.)

This also fixes that the function signatures did not match the function
type with which these functions were called. They were called as:

   int (*)(const m_option_t*, int, void*, void*)

but the actual function signatures were:

   int (*)(m_option_t*, int, void*, MPContext *)

Two arguments were mismatched.

This adds one line per property implementation. With additional the
reordering of the parameters, this makes most of the changes in this
commit.
options: remove some unneeded stuff

No options pointing to global variables are in use anymore, so that part
can be removed.
options: remove some more stuff

The "classic" sub-option stuff is not really needed anymore. The only
remaining use can be emulated in a simpler way. But note that this
breaks the --screenshot option (instead of the "flat" options like
--screenshot-...). This was undocumented and discouraged, so it
shouldn't affect anyone.