Fix compilation with OpenCL on MacOS X

Also fix crash in the case of OpenCL error during encoding.
Fix building with compilers without inline asm support

Also fix crash in high bit depth builds compiled with unaligned stack.
Fix potential misaligment crash in AVX2 denoise_dct
Fix build with PIC on some systems
Fix possible crash when writing very large filler NALUs

Bitstream-reallocation function didn't handle the case of filler.
OpenCL cosmetics
Interface: if vbv-maxrate < bitrate, set bitrate = vbv-maxrate

This probably makes more sense to the user than setting vbv-maxrate = bitrate,
as before.
Add "--stitchable" option for segmented encoding

Stops x264 from attempting to optimize global stream headers, ensuring that
different segments of a video will have identical headers when used with
identical encoding settings.
Add new color primaries, transfer characteristics, matrix coefficients
x86: faster AVX2 iDCT, AVX deblock_luma_h, deblock_luma_h_intra
Tweak i16x16-delta-quant-avoidance code

Don't omit the delta quant if it'd raise the quantizer to do so; this fixes
a rare flickering issue caused by deblocking.
Merge branch 'master' into kaudio

Conflicts:
	x264.c