Basic xdg directory implementation

Search $XDG_CONFIG_HOME and $XDG_CONFIG_DIRS for config files.
This also negates the need to have separate user and global variants of
mp_find_config_file()

Closes #864, #109.

Signed-off-by: wm4 <wm4@nowhere>
player: remove some minor code duplication in config loader code

It's better to keep the logic in one place.

Also drop that a broken config file aborts loading of the player. I
don't see much reason for this, and it inflates the code slightly.
config: prefer the old config dir if it exists, but XDG doesn't

This means normally the XDG config dir will be used. But if the old
config dir (~/.mpv) exists and the XDG config dir does not, then don't
create it.

To simplify the code, also make mp_path_exists() accept NULL paths. In
that case it's considered as not existing. (Funnily, on Linux this
already worked, because the string is passed directly to the kernel,
and the kernel will just return EFAULT on invalid memory.)
player: create config dir if it doesn't exist

This was dropped in the commit adding XDG support, probably
accidentally.

Also normalize some whitespace.
config: make passing talloc context optional for some functions

Until now, the config functions added various allocations to the user-
provided talloc context. Make it so that they're all under the returned
allocation instead. This allows avoiding having to create an extra
temporary context for some callers, and also avoids adding random memory
leaks by accidentally passing a NULL context.

mp_find_all_config_files() has to be changed not to return a pointer
into the middle array for this to work. Make it add paths in order
(instead of reverse), and then reverse the array entries after that.

Also remove the declarations for the win-specific private functions.
Remove STRNULL(); it's barely needed anymore and the functions are
not called with NULL filenames anymore.
config, player: avoid some temporary talloc contexts

IMO a semi-bad concept, that the mpv code unfortunately uses way too
much.
config: handle --no-config case directly in mp_config_dirs()

Requires less special-casing, and probably also avoids that starting mpv
with --no-config creates a config dir (even if nothing is loaded).
config: use the same signature for win32/OSX specific path functions

Seems like a good idea, even if it's basically unused (yet).

Also document requirements on the functions (they're not obvious).

OSX changes untested.
scripting: shorten a line

Also allows it to deal with NULL return values, which currently is not
needed, but may or may not be required at some point in the future (what
if malloc fails).