VO: fix X display depth handling (makes depth 30 work)

vo_vdpau and vo_xv had code that selected output window depth by
checking X root window depth, using that value if it was one of the
values 15, 16, 24, 32, and otherwise using 24. This broke displays set
in 30-bit mode (at least NVIDIA supports such 10 bits per component
mode), as it tried to use 24 which is not supported in that mode.
Simply remove the list of allowed modes and use whatever the root
window depth is.

The list of allowed modes was originally added for displays that used
8 bits for the root window but allowed creating higher-depth windows
(such displays should not be relevant any more). That it listed
specific modes instead of a simple greater-than comparison is likely
because it was written for vo_x11 which cares about the exact format.
Probably this code was then blindly copied to other VOs.

The same questionable logic was also used in the shared X11 vo_init()
function, but there the result depth wasn't used for anything except
printing verbose-level output and setting the "depthonscreen" variable
that is only used in vo_x11. Move this logic from x11_common.c to
vo_x11.c.
osd: add changes missing from recent 393988c274 (exit crash)

Commit 393988c274 ("build: clean up remnants from internal FFmpeg
build") was somehow missing free()->av_free() changes in one place.
This could cause a crash when exiting the player if av_free()
differed from free() (mainly on MSWindows).
build: support 64-bit MSWindows in EXTERN_PREFIX definition

The EXTERN_PREFIX definition added back in 7d3ccb47f9 ("configure: go
back to platform-based EXTERN_PREFIX test") needs a separate case for
_WIN64, as MinGW defines both that and _WIN32 but there is no prefix
unlike 32-bit case.
Merge remote-tracking branch 'upstream/master'