Fix compilation with Libav

Doesn't define AVPROBE_SCORE_RETRY for some reason. They use
AVPROBE_SCORE_MAX/4 directly internally. AV_DISPOSITION_ATTACHED_PIC
is not defined with the most recent Libav release.

AVIOContext.av_class exists in Libav, but is apparently disabled in
old releases. Disable it for now until people stop torturing me with
old crap releases.
sd_lavc: keep subs on subtitle track switching

Keep the currently displayed subtitles even when the user cycles through
subtitle tracks, and the subtitle is decoded by libavcodec (such as
vobsubs). Do this by not clearing the subtitles on reset(). reset() is
also called on seek, so check the start PTS whether the subtitle should
really be displayed (there's already an end PTS). Note that sd_ass does
essentially something similar.

The existing code has checks for whether the PTS reported by the demuxer
is invalid (MP_NOPTS_VALUE). I don't know under what circumstances this
can happens, so fall back to the old behavior if the PTS is invalid.
options: handle -v during pre-parsing command line

Otherwise -v is honored too late, and some output will be missing. In
particular, this prevented printing of the libav* library versions.
cleanup: remove ao.brokenpts

This field was used by ao_v4l2, and is now unused.
vf_sub: fix aspect ratio when using margins
options: move -ass-bottom-margin/-ass-top-margin options to vf_sub

These options might be useful sometimes, but they are not that
important, and work with vf_sub only. Make them vf_sub sub-options.
Fix compilation with ffmpeg 1.0

AVPROBE_SCORE_RETRY was too new, and doesn't even exist in Libav. Go
back to using the value explicitly.
ao_lavc: stop using av_get_alt_sample_fmt

Use av_get_planar_sample_fmt instead.
sd_ass: free external subtitle tracks
video: silence warnings for missing libavutils pixel formats

Using vf_screenshot on Libav printed useless/misleading error messages
when playing 10 bit h264 with a VO that supports 8 bit yuv420p only:

    Unsupported format 444p14le
    Unsupported format 444p14be
    ...

The cause of this is that vf_scale is inserted to handle the format
conversion, and tries to find a pixel format with best quality. This
includes the 14 bit and 12 bit formats, which don't exist on Libav.
vf_screenshot tries to query whether Libav's libswscale supports it,
resulting in these error messages. (In theory, vf_scale is missing this
check, but it doesn't matter in practice.)

Since this warning is rather useless anyway, because all input video
comes from libavcodec, and only the conversion into the other could
possibly fail. Silence the warning by raising it to verbose message
level.

Closes #7.
ass_mp: allow to use a custom fontconfig configuration file

This allows to use a fontconfig fonts.conf that is customized for mpv. The
configuration file is assumed to be located at `~/.mpv/fonts.conf`. If not
found the default fcontconfig config file is used.
core: path: run uncrustify

Even if this is not so bad as other files, I need to add some stuff so...
why not!?

`uncrustify -l C -c TOOLS/uncrustify.cfg --no-backup --replace core/path.h`
`uncrustify -l C -c TOOLS/uncrustify.cfg --no-backup --replace core/path.c`

The header was unchanged by the tool.
path: add mp_find_config_file and reorganize some of the code

Add `mp_find_config_file` to search different known paths and use that in
ass_mp to look for the fontconfig configuration file.

Some incidental changes spawned by this feature where:

 * Buffer allocation for the strings containing the paths is now performed
   with talloc. All of the allocations are done on a NULL context, but it still
   improves readability of the code.
 * Move the OSX function for lookup inside of a bundle: this code path was
   currently not used by the bundle generated with `make osxbundle`. The plan
   is to use it again in a future commit to get a fontconfig config file.
osxbundle: add fonts.conf to distributed bundle

The osxbundle target creates a bundle that is supposed to be distributable
to third parties. As they may not have fontconfig installed they miss a
fonts.conf pointing to the usual fonts directories in OSX.

For people installing from source and using from the terminal this commit
changes nothing. You just have to make sure that your fontconfig is installed
with a sane configuration (XQuartz does). If you are installing fontconfig from
source you can force a sane OSX default using `--with-add-fonts`. For example:

  `./configure --with-add-fonts=/Library/Fonts,~/Library/Fonts`

Homebrew already addressed this with mxcl/homebrew@b242883
osxbundle: print meaningful error when a dylib is missing

If one of the bundled libraries is pointing to a missing dylib stop the
bundling and exit with an error. This can happen if the user uninstalled a
dependency after he built the binary/libraries.
core: make WAKEUP_PERIOD overridable by the vo

This is better than having just the operating system type decide the
wakeup period, as e.g. when compiling for Win32/cygwin, a wakeup period
of 0.5 would work perfectly fine.

Instead, the default wakeup period is now only decided by availability
of a working select() system call (which is the case on cygwin but not
mingw and MSVC) AND a vo that can provide an event file descriptor or a
similar hack (vo_corevideo). vos that cannot do either need polling for
event handling and now can set the wakeup period to 0.02 in the vo code.
configure: clean up use of extra_ldflags and libs_mplayer

Now, extra_ldflags ought to only consider LDFLAGS, and all libraries
shall go into libs_mplayer. In the end, the command line first contains
extra_ldflags, and then libs_mplayer.

So altogether this change has the effect that libraries get added to the
linker command line in the order the configure script checks them.
Previously there was some reordering due to some checks adding libraries
to libs_mplayer and some to extra_ldflags.
stream_dvd: fix angle math

Stop changing the dvd_angle variable while opening a DVD. Fixes issues
with multiple dvd:// URLs on one command line.
sub: add ASS to RGBA conversion

This makes implementing new VOs easier, because they don't have to
support the ASS format.
vf_scale: support more pixel formats

The RGBA, ARGB, BGRA, ABGR were previously not always supported,
depending on system endianness.