Fix build with Android NDK

Android NDK does not expose sched_getaffinity.
Really fix quantization factor allocation

Actually allocate less (instead of just initialize less) and fix comments.
x86: Pass -Worphan-labels to yasm

Makes it easier to detect typos.
x86inc: warn if XOP integer FMA instruction emulation is impossible

Emulation requires a temporary register if arguments 1 and 4 are the same; this
doesn't obey the semantics of the original instruction, so we can't emulate
that in x86inc.

ffmpeg has an x86util emulation for that case; I'll add it if x264's asm ever
needs it.

Also add pmacsdql emulation.
x86inc: Support arbitrary stack alignments

If the stack is known to be at least 32-byte aligned we can safely store ymm
registers on the stack without doing manual alignment.

Change ALLOC_STACK to always align the stack before allocating stack space for
consistency. Previously alignment would occur either before or after allocating
stack space depending on whether manual alignment was required or not.
Fix pointer cast warning for 64-bit builds
x86: Minor mbtree_propagate_cost improvements

Reduce the number of registers used from 7 to 6.
Reduce the number of vector registers used by the AVX2 implementation from 8 to 7.
Multiply fps_factor by 1/256 once per frame instead of once per macroblock row.
Use mova instead of movu for dst since it's guaranteed to be aligned.
Some cosmetics.
Write 3D metadata when outputting Matroska

For when --frame-packing is set.
Don't set chroma_loc_info_present_flag for non-4:2:0

The H.264 spec says it shouldn't be set in these cases.
Add support --chapter/--no-container-sar/--no-remux/--fragments.

These are L-SMASH MP4 muxer specific options.
Increase the temporal buffer size for Unicode support

Although the maximum size of one character in UTF-16 is 4bytes,
sizeof(wchar_t) is 2bytes on Windows.
Also, non-ASCII characters requires 2bytes in ANSI code page.
The existing buffer size is insufficient.
Film Grain Optimization
Fade Compensation
Log file
Encoding time
Cosmetic
New experimental AQ mode (modification of Auto-variance AQ)
Print video info with lavf/ffms demuxer
Detect color matrix with lavf/ffms demuxer
Fix AviSynth/swscale color space converting matrix