x11: wait until the window is mapped

This blocks everything, until the window is actually reported as mapped.

This fixes the race condition between VO initialization and mapping the
window, which resulted in possibly different window sizes, leading to an
immediate redraw, visible as flashing.

Note that if the map event never comes for some reason, we're out of
luck and will block forever.
x11: clear window on map

vo_x11_map_window() was attempting to clear the window on map. However,
it did so immediately after the map request. It probably assumed that
the drawing calls for clearing the window would be queued along with the
map request, and then executed in the right order. However, this
assumption was wrong - the map request first has to go to the window
manager (I guess?), so a lot of things happen before the window is even
mapped.

Fix this by moving the call to the MapNotify message handler, when the
window (apparently) becomes really visible.

I also tried to set CWBackPixel to black instead, but this seemed to
result in flickering on manual resizing.
x11: set the fullscreen state before mapping the window

This should get rid of some flickering. Since this actually skips all
the wacky fullscreening code on startup, this might lead to certain
wacky features to stop working. In this case, you'll have to use the
--x11-fstype option, and disable _NETWM_STATE_FULLSCREEN usage.
x11: remove unused stuff

Unfortunately, it looks like some Motif functionality is still needed
to allow for --no-border.
x11: remove a MWM hack

This was for Motif Window Manager. No, I don't care about Motif.
x11: replace--[x11-]fstype option with --x11-netwm

Simplifies the code a lot. You can still use --x11-netwm=no to disable
NetWM for whatever reasons.
etc/example.conf: remove spaces between key and value

Currently, they are allowed, but only because MPlayer happened to do
that. This might or might not be changed in the future.
etc/example.conf: minor adjustments
etc/example.conf: add example options for multichannel audio
encoding: No error when the output format doesn't support a stream type at all.

When writing a video to foo.mp3, the user's intention is clearly to drop
the video stream, and similarly, when writing to foo-%d.png, the
intention is clearly to drop the audio stream. Now, explicit
specification of --no-audio or --no-video is no longer necessary in
these cases.
x11: inline a function

Keeping it separate seems less readable.
x11: don't cache X Atoms manually

XInternAtom() already caches lookups. Even if calling XInternAtom would
be always inefficient, it wouldn't matter much during normal playback.
x11: remove gravity restore code

It was added with 3813c685 in 2004. I'm not really sure why this gravity
stuff would be needed; apparently it has to do with misplacements with
broken WMs and had to be changed on fullscreen. Just get rid of it; it
works perfectly fine without on modern WMs.

The thread discussing this is here:
http://mplayerhq.hu/pipermail/mplayer-dev-eng/2004-July/027674.html
x11: use CenterGravity by default

Keeps the window centered on resize. Seems nicer. (Although it's worse
if 1. the default placement of the WM puts it into a monitor corner,
and 2. you switch to a larger video.)
x11: implement --fs-screen properly, separate old code path

Try to get the "new" code path (using NetWM/EWMH) free of hacks done for
the sake of old WMs or the no-WM case.

Implement --fs-screen using _NET_WM_FULLSCREEN_MONITORS.
x11: always raise layer in fullscreen mode without NetWM
x11: remove vo_hint member

Now it's always recreated in vo_x11_sizehint(). Also, the Xlib manual
says you must use XAllocSizeHints() (for ABI reasons), so do that.
x11: don't set PBaseSize

There's apparently no reason why we should set a bogus size.
x11: remove some unused fields
x11: replace x/y/w/h with mp_rect