param: clip bframe bias range as x264 does
encoder: set m_totalFrameThreads at the same time as param->frameNumThreads
nal: greatly simplify NAL header generation, do not use TComOutputBitstream

This saves a malloc/free and a great deal of needless overhead
nal: msvc and its integer conversion warnings