stream: always respect sector_size, fixes cdda://

Streams like CDDA have special requirements in what quantities data can
be read: you can only read a sector at once, not more and not less. The
stream_peek() function didn't respect that and set less (used internal
buffer size of 2048 bytes, instead of CD sector size of 2352 bytes), so
no data was read and EOF was accidentally set, making playback with
cdda:// fail.

This is a regression since commit 9a723f, but that commit merely exposed
the issue (the redundant seek would clear the EOF flag).
ao_alsa: Fix PCM resume after suspend

Fixes #324
ao_alsa: Unbreak pause/resume

Well that was dumb.
wayland: don't change set fullscreen twice

Newest weston chrashes if we call set_fullscreen twice. This is a major bug
I which I should probably report.
wayland/shm: only commit new frames

Only attach and commit new buffers. This also increases performance when
paused.
wayland/opengl: fix garbage borders

It seems mpv draws garbage in those regions. Now we calculate the aspect and
let weston draw the black borders.
build: fix cocoa configure check on OS X 10.7

It failed because the 10.7 SDK doesn't natively support array and dictionary
subscripting.
vda: fix build on OS X 10.7

Looks like on 10.8 OpenGL.h recursively includes CGLIOSurface.h. That is not
the case for 10.7 so the build was broken on that version of OS X.
ta: check overflow in array realloc macros
audio: check for overflows
stream_pvr: fix crash on initialization

Fallout from the mp_msg conversions.
dvdnav: set correct stride for fake highlights

This didn't really matter, because the fake highlight rectangle is in a
single color, and every pixel has the same color value.
manpage: mention --pause
wayland: move workaround to fullscreen code

Because of this workaround there was a bug in the wayland vo.
Now it works on both vos (opengl and shm) as it should.
wayland: Remove nonsense comment and add warning

The reason a segmentation happend here was because we couldn't get the
requested minor version. The major version is enough for differentiating
between OpenGL 3 and OpenGL 2. If it fails there is still a fallback to any
version available.

Also add a warning if we use the fallback.
wayland/egl: add egl_context to the wayland state

At the moment there are visual glitches when we resize the window. This happens
because in wayland there a special function for resizing EGL windows.

To prevent the glitches move the egl_context to the wayland state in
wayland_common.h and add a new control function to gl_wayland.c to wrap the
vo_wayland_control function to check for resize events.

With the new control wrapper the glitches are gone and the resizing is fluid.
wayland/egl: use redraw callback

This solves the issue where we would not receive any frame events. The
difference to my earlier tests is that now it looks like eglSwapBuffers uses
it's own event queue or something similiar along the lines. Becaues the
performance is the same as without any redraw callback.
wayland/egl: misc fixes and cleanups
demux_subreader: reject file if not opened by --sub

demux_subreader.c contains the old MPlayer subtitle parser, and I have
absolutely no confidence in this (very crappy) code. There might be
one or two security risks associated with running that code on
arbitrary input.
wayland: remove workaround

The changes in the vo_wayland_ontop function have no effect on the workaround.

Somehow the problem just disappeared. I guess it is because of the new control
function in gl_wayland.c where the resize happens immediatly after the event
dispatch/flush.