vo_lavc: use mp_image_copy_fields_to_av_frame
vo_lavc: do NOT fill pict_type from the mp_image

Doing this makes the encoder force the same pict type as original, which
is often not even possible. Rather let the codec decide!

As there is no documented value to mean "decoder shall pick", I rather
save/restore the default value filled by libavcodec.
cache: actually use time instead of retry count for slow cache warning

There's actually no reason to maintain a retry count, and this is more
robust against spurious wakeups.
osdep: remove shmem wrapper

This is unused now that the cache is always threaded.
sd_srt: handle '<font color="##FFA500">'

Wow this is stupid.
cache: fix stream_pts caching

Or rather, keep hacking it until it somehow works. The problem here was
that trying to avoid calling STREAM_CTRL_GET_CURRENT_TIME too often
didn't really work, so the cache sometimes returned incorrect times.

Also try to avoid the situation that looking up the time with an
advanced read position doesn't really work, as well as when trying to
look it up when EOF or cache end has been reached. In that case we have
read_filepos == max_filepos, which is "outside" of the cache, but
querying the time is still valid.

Should also fix the issue that demuxing streams with demux_lavf and if
STREAM_CTRL_GET_CURRENT_TIME is not supported messed up the reported
playback position.

This stuff is still not sane, but the way the player tries to fix the
playback time and how the DVD/BD stream inputs return the current time
based on the current byte position isn't sane to begin with. So, let's
leave it at bad hacks.

The two changes that touch s->eof are unrelated and basically of
cosmetic nature (separate commit would be too noisy.)
configure: remove redundant WINVER set
vo_lavc: remove unused variable
ao_wasapi0: add new wasapi event mode ao
OSX: fix compilation with 10.7 SDK

Recent work in the OS X parts of the code started using clang's support for
Obj-C's support for Literals and Subscripting. These particular language
features remove a lot of boilerplate code and allow to interact with
collections as consicely as one would do in scripting languages like Ruby or
Python.

Even if these are compiler features, Subscripting needs some runtime support.
This is provided with libarclite (coming with the compiler), but we need to
add the proper method definitions since the 10.7 SDK headers do not include
them. That is because 10.7 shipped before this language features.

This will cause some warnings when compiling with the 10.7 SDK because the
commit also redefines BOOL to make autoboxing/unboxing of BOOL literals to
work.

If you need to test this for whatever reason on 10.8, just pass in the correct
SDK to configure's extra cflags:

  ./configure --extra-cflags='-mmacosx-version-min=10.7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk'

Fixes #117
ildetect.sh: env vars support
ildetect.sh: better interlace detection range
encode_lavc: simplify encoding status output; remove percentage
command line: allow --o= to disable encoding (i.e. empty string file name)
encoding: use --start for ratios, etc.

Note: this currently only works for formats without pts resets. Other
formats will ignore this code.
ildetect.sh: skip needlessly going through vo_lavc

We can now turn off encoding mode by command line and use vo_null
instead.
ildetect.sh: add a quiet mode; verify telecine decision

For quiet mode: ILDETECT_QUIET=1 ildetect.sh ...

Telecine decision (guess by ildetect.so) is verified by retrying the
ildetect run with the pullup filter inserted.
ildetect: $ILDETECT_RUN_INTERLACED_ONLY to only run the job if not progressive
configure: cocoa: link to libarclite

libarclite provides method stubs for the Subscripting headers added in
0407869ae3. This allows to correclty build mpv on OSX 10.7 (I had tested that
commit with OSX 10.8 running 10.7 SDK).

It seems on 10.8 this option does't make any difference in the linked libraries
(checked with otool -L) so I just add it unconditionally.

Warning: This doesn't mean mpv moved to ARC. To do that one would have to add
`-fobjc-arc` to the cflags.
av_log: change how ffmpeg log messages are formatted

Don't print the ffmpeg context pointer as %p. This is usually useless
and confusing. Prefix all messages with "ffmpeg" to make clear that
ffmpeg is printing these messages, and not us.

If libavcodec is from Libav, use "libav" as prefix instead. (In theory,
FFmpeg/Libav libraries could be mixed, but I don't think that is
actually possible in practice.)