rc: fix type of actualBits

--HG--
extra : rebase_source : 2e5df0bd5df825e79e9f434d24d3a51eef793072
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.

--HG--
extra : rebase_source : ead71e684cc7ea0123ed3223d32dee4a571cc805
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

--HG--
extra : amend_source : e3065985b3abf81a04a4f42697ba4d36365082c9
encoder: no longer needs NALwrite.h
nal: fix checked build