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.
Fix checkasm --bench output when nop_cycles is too large
Fix corruption with CAVLC overflow handling in MBAFF+main profile

Probably a regression in 83561e.
Fix memory overwrite in x264_deblock_h_chroma_mbaff_sse2

Fixes possible corruption with MBAFF+sliced threads.
mbaff: fix mb_field_decoding_flag tracking and simplify allow skip check

Fixes an issue with too many forced non-skips in mbaff+cavlc, as well as
non-deterministic output with mbaff+cavlc+sliced-threads.
Fix pointer cast warning for 64-bit builds
x264.h: fix documentation

The full details of the return values of encoder_encode and encoder_headers
were mistakenly removed a while ago; re-add them.
Merge remote-tracking branch 'upstream/stable'