tv: use correct timestamps

Squashed from the following mplayer-svn commits. The '#' is removed from
the bug ID to prevent github from doing something stupid. Instead of
adding the mplayer configure check for clock_gettime(), the POSIX
identifiers are used for checking presence of the function.

Use correct type of timestamps when recording from v4l2. Fix 2176

Patch by Jarek Czekalski <jarekczek at poczta onet pl>.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@37222 b3059339-0415-0410-9bf9-f77b7e298cf2

Allow building of v4l2 without clock_gettime().
Add overly verbose message in case monotone timestamps are required by the kernel.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@37223 b3059339-0415-0410-9bf9-f77b7e298cf2
options: fix for compilation when encoding disabled

HAVE_* flags are always defined so ifdef will never work.
They should be checked with their values.
encode: make the central lock recursive

Unfortunately, there's a recursive function call in ao_lavc.c (play
function), leading to a deadlock. The locking is getting a bit messy, so
just make the lock recursive.

This fixes #844.
audio: don't wait when draining and paused

A corner case that could possibly lead to infinite waiting. Though
I'm not aware that this actually happened in practice.
audio: more detailed debugging output

Dump what the AO does on driver->play().
encode: don't load Lua scripts

This is most likely never intended.
stream_bluray: fix some const declarations

Like in commit 99f5fe.
tv: fix a hidden static variable
win32: implement --priority differently

Does anyone actually use this?

For now, update it, because it's the only case left where an option
points to a global variable (and not a struct offset).
cache: print cache size only in verbose mode

Seems pretty useless in general, so this reduces output noise.