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