nal: refactor nal code, marshall packets directly into output buffer

This removes two malloc/free for every NAL unit and removes yet another set of
memcopies at the end of the each frame encode. We're now writing the escaped
NAL packets directly into the buffer handed back to the user.

We preserve the max size of this output buffer to prevent having to do any
reallocations once the encoder is running.
encoder: remove useless comment
api: introduce param variables for two-pass encodes
rc: define default setting and validations for 2 pass states
rc: add 2 pass states in RateControl
param: log rc states of m_param in x265_param2string
rc: initialize the 2 pass states in rc
remove reduce code since trHeight always equal to trWidth
static m_bLFCrossTileBoundary since all of LCU use same value
move m_blockingStrength to local
cu: nits
TComDataCU: refactor structure for better data locality
rc: disable MSVC warnings about using POSIX function names like unlink()