af_lavrresample: fix inverted condition

This was added with the previous commit. It likely broke some obscure
special-cases, which (hopefully) do not happen with normal playback.
audio: fix ALSA 4 channel surround output

It turns out that ALSA's 4 channel layout is different from mpv's and
ffmpeg's 4.0 layout. Thus trying to do 4 channel output led to incorrect
remixing via lib{av,sw}resample.

Fix the default layouts for the internal filter chain as well, although
I'm not sure if it matters at all.
cocoa_common: fix a bug in window dragging state

When going in and going out of full screen the player lost information on the
movableByWindowBackground behaviour. There were some hacks in place to fix it
but they were broken with the recent native fullscreen changes in 74c15ec6.

This commit removes the problem at the root and removes the hacks. The delegate
method `isMovableByWindowBackground` seems to be called after setFrame and
setPresentationOptions so change fs state in opts before that.

Fixes #83
cocoa_common: remove pointless locking when using -fs

When using --fs `vo_cocoa_fullscreen` was called from the primary thread. This
occurred inside `vo_cocoa_config_window` which is scheduled for excution on the
primary thread with libdispatch).

All of this caused spam from NSRecursiveLock in standard output.
cocoa_common: don't use recursive locking

This was in the original change set for the threadsafety changes but I forgot
to squash it in.
cocoa_common: order front window only when invisible

Window creation code always made mpv the front window. Fix it to make it front
only if the window is currently invisible.

Fixes #84
chmap: fix oddity due to ambiguous 6.1 ffmpeg channel layout

FFmpeg (as well as Libav) have two layouts called "6.1":
AV_CH_LAYOUT_6POINT1 and AV_CH_LAYOUT_6POINT1_BACK. We call them "6.1"
and "6.1(back)". Change the default layout for 7 channels as well to
return the same layout as av_get_default_channel_layout(). (Looks a bit
questionable, but for now it's better to follow FFmpeg.)
cocoa_common: order front window only when invisible [2]

Followup to 8df7127. This refines the condition for front ordering the
condition to account for minimized or hidden state where the window should go
to the front only as a consequnce of user interaction.
vd_lavc: hack-fix vdpau decoding with non mod 16 video

This changes the code so that it does the same as MPlayer, mplayer2
and mpv before ref-counted AVFrame. The problem is that get_buffer2
is called with aligned frame dimensions, while get_buffer didn't. This
breaks the mpv video frame size change detection.
Merge remote-tracking branch 'upstream/master'