commands: remove legacy slave mode get commands

These have been replaced by properties. Also remove some other slave-
mode specific get commands that can be replaced by property uses.

The get_metadata() function didn't actually contain anything useful,
and just replicated code from other parts of mplayer.
commands: simplify legacy command-to-property bridge

There are many input commands which are redundant to properties. They
were parsed like normal commands, but set_property_command() in
command.c handled them automatically using the property mechanism. This
still required having the command specifications around, and the code in
command.c was quite messy.

Replace this with a text based replacement mechanism. Some corner cases
are not handled: commands of form "seek_chapter 3 1" are supposed to set
the "chapter" property to 3. This use is probably rare, and doesn't show
up in the default input.conf.

The reason compatibility is kept is because breaking input.conf is quite
annoying, so a minimal effort is made to avoid this. Currently we print
an annoying warning every time a legacy command is used, though.

Also add a compatibility entry for "pt_step", which was removed some
time ago. Variations in whitespace are not handled, but it's good enough
to deal with old input.conf entries.
commands: minor cleanup for property_osd_display array

Make the definition more compact and less confusing by omitting rarely
used fields. Avoid having to initialize osd_id with -1 in every entry
by making 0 an unused OSD ID instead.
commands: change input commands to make OSD usage explicit

Most input commands had their own policy whether to display an OSD
message for user feedback or not. Some commands had two variants, one
that showed an OSD message and one that didn't (e.g. step_property_osd
and step_property).

Change it such that all commands show a message on the OSD. Add a
"no-osd" modifier that disables OSD for that command. Rename the
"step_property" and "step_property_osd" command to "switch", and rename
"set_property" and "set_property_osd" to "set".

Note that commands which haven't used OSD before still don't use OSD.
That will possibly be fixed later. (E.g. "screenshot" could display an
OSD message instead of just printing a message on the terminal.)

The chapter and edition properties still produce OSD messages even with
"no-osd", because they don't map so well to the property_osd_display[]
mechanism.
commands: remove unimplemented "use_master" command

The implementation for this command was removed in 2002.
commands: rename properties, update input.conf

Use "-" instead of "_" in property names. The intent is that property
names and options names should be the same (if they refer to the same
thing), and options use "-" as word separator.

Rename some other properties too, e.g. "switch_audio" -> "audio".

Add a way to translate the old property names to the new ones, similar
to the input command legacy bridge.

Update input.conf. Use the new property names, and don't use legacy
commands.
commands: fix parsing bug

When tabs are used as whitespace between command and the first string
parameter, the string is not correctly terminated.
commands: remove speed_set/speed_incr commands

Redundant with set/switch commands.
commands: rename osd_show_[property_]text and osd_show_progression

osd_show_[property_]text => show_text
osd_show_progression => show_progress

show_text, osd_show_property_text and osd_show_text both map to the
code for the previous osd_show_property_text. The only special thing
about osd_show_text is that you don't need to escape "$". Also,
unfortunately osd_show_property_text requires escaping things twice,
one time for the command parser, and the other time for the property
formatting code, while osd_show_text needed only one level of escaping.
commands: remove third parameter for "switch"

This could change the direction (i.e. invoke STEP_PROPERTY_DOWN), but
you can just pass a negative value as second argument instead.
commands: replace --hardframedrop, change framedropping property

Replace --hardframedrop with --framedrop=hard. Rename the framedrop
property from "framedropping" to "framedrop" for the sake of making
command line options have the same name as their corresponding
property. Change the property to accept choice values instead of
numeric values.

Remove unused/forgotten auto_quality variable.
commands: rename "osdlevel" option and property, make it a choice

Rename both the option and property to "osd-level", which fits a bit
better with the general naming scheme. Make it a choice instead of an
integer range. I failed to come up with good names for the various
levels, so leave them as-is.

Remove the useless property handler for the "loop" property too.
options: remove CONF_TYPE_POSITION

This was the option parser for the off_t C type. These days, off_t is
always int64_t, so replace all its uses by int64_t and CONF_TYPE_INT64.

Fix the --sstep option. It used CONF_TYPE_INT with an off_t variable,
which will result in invalid memory accesses. (It worked, perhaps
because virtually all systems are little endian, and the out of bound
access happened not to overwrite anything important.) Make it use type
double instead, which seems to make more sense for this option.
commands: handle property stepping in a generic way

Instead of forcing each property implementation implement its own logic
for M_PROPERTY_STEP_UP/M_PROPERTY_STEP_DOWN, handle it in the generic
property code.

Rename the M_PROPERTY_STEP_UP command to M_PROPERTY_SWITCH (the other
property command, M_PROPERTY_STEP_DOWN, isn't needed anymore: stepping
downwards is done by passing a negative argument). Always use double as
argument type; it makes the code easier, and covers all property types.
Move the code which does the actual type-specific value stepping to
m_option.c (the idea is that m_option handles types).

Some properties still have custom handlers implemented with
M_PROPERTY_SWITCH. They can't be mapped to the generic mechanism,
because their value range is dynamic or entirely unknown.

For some properties, the default step stride is changed to 1. This is no
issue, because the default bindings in input.conf all use an explicit
stride in the affected cases.
commands: remove pointless NULL checks

Most property implementations checked whether the "arg" parameter was
NULL. This is entirely pointless, because NULL is actually never pased.
It was inconsistently done, too. Remove the checks.
options: make cache option always per-file

When playing a network stream, the cache is automatically enabled. We
don't want the cache to stay enabled when playback ends. (For example,
the next file to be played could be a local file, and even if that is
relatively contrieved, we want to do the right thing.)

Introduced the flag M_OPT_LOCAL to force an option to be always file
local. This allows enabling the old mplayer semantics on a per option
basis.
commands: generally handle property formatting with m_option

Use the m_option code by default to format property values, instead of
having separate code in m_property.

To facilitate that, add a pretty_print callback to option types. These
format values in a more human readable and user friendly way, as opposed
to the print callback, which produces parseable values.

This also changes the strings used with flags. Instead of "enabled" and
"disabled", flags are formatted as "yes" and "no". (We could use the
pretty_print callback to deal with this, but we don't for consistency.)
options: accept "yes" and "no" only for flags

This removes the alternative values like "off", "0", "false" etc., and
also the non-English versions of these.

This is done for general consistency. It's better to have a single way
of doing things when multiple ways don't add singificant value.

Also update some choices for consistency.
options: simplify somewhat by introducing a union for option values

The m_option_value union is supposed to contain a field for each
possible option type (as long as it actually stores data). This helps
avoiding silly temporary memory alocations. Using a pointer to an union
and to a field of the union interchangeably should be allowed by
standard C.
commands: handle property clamping in m_option

Instead of clamping property values to the valid range in each property
implementation, handle it in the property layer. The functionality to
handle clamping for each type is in m_option.c.

It's not really clear whether this is really needed. Normally, the raw
values for M_PROPERTY_SET come only from m_option_type.parse (setting
properties as string) or from m_option_parse.add (using the "switch"
input command). However, since this was already done before, and since
we _really_ want to be sure only to write valid values, add this code
anyway. The newly added warnings/error messages should never actually
be printed during normal operation and are for debugging (if they
happen, we definitely want to see them).