x86: correctly check stack alignment for Atom hadamard_ac

Regression in r2265 (only affected compilers with broken stack alignment,
like ICL on win32).
weightp: improve scale/offset search, chroma

Rescale the scale factor if the offset clips. This makes weightp more effective
in fades to/from white (and an other situation that requires big offsets).

Search more than 1 scale factor and more than 1 offset, depending on --subme.

Try to find the optimal chroma denominator instead of hardcoding it.

Overall improvement: a few percent in fade-heavy clips, such as a sample from
Avatar: TLA.
OpenCL lookahead

OpenCL support is compiled in by default, but must be enabled at runtime by an
--opencl command line flag. Compiling OpenCL support requires perl. To avoid
the perl requirement use: configure --disable-opencl

When enabled, lookahead thread is mostly off-loaded to your OpenCL capable GPU
device.  Lowres intra cost prediction, lowres motion search (including subpel)
and bidir cost predictions are all done on the GPU.  MB-tree and final slice
decisions are still done by the CPU.  Presets which do not use a threaded
lookahead will not use OpenCL at all (superfast, ultrafast).

Because of data dependencies, the GPU must use an iterative motion search which
performs more total work than the CPU would do, so this is not work efficient
or power efficient. But if you have spare GPU cycles to spare, it can often
speed up your encode. Output quality when OpenCL lookahead is enabled is often
slightly worse in quality than the CPU quality (because of the same data
dependencies).

x264 must compile its OpenCL kernels for your device before running them, and in
order to avoid doing this every run it caches the compiled kernel binary in a
file named x264_lookahead.clbin (--opencl-clbin FNAME to override).  The cache
file will be ignored if the device, driver, or OpenCL source are changed.

x264 will use the first GPU device which supports the required cl_image
features required by its kernels. Most modern discrete GPUs and all AMD
integrated GPUs will work.  Intel integrated GPUs (up to IvyBridge) do not
support those necessary features. Use --opencl-device N to specify a number of
capable GPUs to skip during device detection.

New in this patch version:
* An MD5 hash of the OpenCL source is written to clbin file and verified on read
* out-of-tree builds have been fixed
* GPU detection has been improved; all GPUs in each platform checked
* Switchable graphics environments are detected (Intel iGPU, AMD dGPU) and
  OpenCL is disabled
* Added param.opencl_device_id so API users can pass in an explict cl_device_id
* Fixed minor issue that caused AMD and NV outputs to diverge slightly
* .gitignore is now aware of build and runtime remnants for OpenCL
* improved detection of AMD Southern Island devices (for non-vectorization)
* xxd build dependency replaced with perl dependency

Developed by MulticoreWare with support from AMD and Telestream
x86inc: create xm# and ym#, analagous to m#

For when we want to mix simd sizes within one function.
x86: more AVX2 framework, AVX2 functions, plus some existing asm tweaks

Use 32-byte alignment instead of 16 to satisfy AVX2 using new macros.
Change the alignment of malloc.

AVX2 functions:
mc_chroma
intra_sad_x3_16x16
last64
ads
hpel
dct4
idct4
quant_4x4x4
quant_4x4
quant_4x4_dc
quant_8x8
SAD_X3/X4
SATD
var
SSD
zigzag interleave
weightp
weightb
intra_sad_8x8_x9
decimate
integral
x86: SSSE3 ads_mvs

~55% faster ads in benchasm, ~15-30% in real encoding.
~4% faster "placebo" preset overall.