core: make more robust against missing libavcodec AVCodecDescriptor entries

Missing entries cause avcodec_descriptor_get() to return NULL, and in
turn mp_codec_from_av_codec_id() will return NULL. This shouldn't
happen, and avcodec_descriptor_get() returning NULL for a valid codec is
clearly a bug.

But make it more robust anyway, and use the decoder's name if this
happens, because I doubt maintainance of the AVCodecDescriptor table
in ffmpeg/Libav will always be perfect and reliable.
core: remove a number of global variables

Move them into per-instance structs. This should get rid of all global
variables in mplayer.c (not counting those referenced by cfg-mplayer.h).

In core/input/ar.c, just remove checking the slave_mode variable. I'm
not sure what this code was supposed to achieve, but slave mode is
broken, slave mode is actually infeasible on OSX (ar.c is completely OSX
specific), and the correct way of doing this would be to disable this
input device per command line switch.
cocoa_common: fix window position when bigger than display

Fix a regression introduced in commit 979ce46c64 causing a window to take up
more space than what the display allows.

Add keepCentered:YES, so that the video area is always clipped to the current
visible frame (even when using scale).

Fixes #38.
vo_opengl: insert a magical glFlush call

Helps a little bit with stuttering with pans and "heavy" subtitles
covering the screen.
configure: remove -fomit-frame-pointer and -ffast-math from CFLAGS

-fomit-frame-pointer is enabled by default with recent gcc and clang
compilers if -O2 is used. It also breaks debugging when optimization is
disabled, so it makes absolutely no sense to have -fomit-frame-pointer
explicitly in the CFLAGS.

Get rid of -ffast-math too. It's little more than cargo-culting, and
might actually break NaN handling and such things.
configure: add _GNU_SOURCE to CFLAGS by default

In theory, projects have to define feature test macros to enable various
system functionality in system headers. (This is done so to ensure new
identifiers can be added to system headers, without breaking old
programs by causing name conflicts.) This includes macros like
_GNU_SOURCE, _BSD_SOURCE, _POSIX_C_SOURCE etc.

Traditionally, gcc as well as glibc headers implicitly assumed
_GNU_SOURCE if no feature test macros were defined by the user.
clang did this too to ensure compatibility with gcc centric programs
(which in practice includes most Linux programs).

However, it appears recent clang versions started to prefer BSD
traditional function over the POSIX, which switches the definition
of a function used by mp_msg.c:

       pid_t getpgrp(void);                 /* POSIX.1 version */
       pid_t getpgrp(pid_t pid);            /* BSD version */

mp_msg.c expects the POSIX version, while clang gives us the BSD
version, resulting in a compilation failure.

Solve this by defining _GNU_SOURCE. This requests most features from
system headers, and explicitly prefers POSIX definitions over BSD,
which should fix the compilation issue.