rc: set pbFactor to default with cutree
rc: use actual bits to update vbv buffer
rc: fixes to improve quality in vbv
rc: fix type of actualBits
api: must match X265_ALLOC with X265_FREE for m_nalUnitData

This was only an issue on Windows
nal: check padded buffer size
rc: convert RateControl to a class

The "struct with methods" metaphore was too stretched here. The methods are too
complicated to keep track of which variables were members; variable shadowing
was very common.
rc: nit
slicetype: convert lookahead "structs with methods" to classes
encoder: remove m_useLossless
encoder: param->m_param for consistency
encoder: bEnableRDOQ->m_bEnableRDOQ for consistency
remove Encoder::bEnableRDOQTS, we did not allow separate config for it

Either RDOQ and RDOQTS were enabled at once, or both were disabled, or TSKIP
was disabled and it didn't matter how RDOQTS was set.

Removed RDOQ_CHROMA as well, which allowed the removal of a warning disable
TComBitstream: nits
encoder: no longer needs NALwrite.h
nal: fix checked build
combine NAL output semantics into one clean(er) interface
Merge with stable
ratecontrol: change type of m_bframeBits to int64_t
weightb: reinitialize weight table when weightb is off