slice: move m_bReferenced to picsym and rename for clarity

This flag was being used for two purposes and introducing race hazards:

1. determining if a picture in the DPB must be signaled in an RPS
2. determining if the slice type is referenced (non-b)

The m_bHasReferences variable on the picsym is used for the first purpose.
The macro IS_REFERENCED(slice) is used for the second purpose.

The m_isReferenced member variable on the frame encoder was removed and
it just checks the slice type directly.
dpb: cleanup
rc: call getEstimatedPictureCost() from API thread, prevent race hazards
rc,weight: nits
remove sign compare warnings from TLibEncoder, cleanup SAO
frameencoder: fix for crash in frameencoder when AccessUnitDelimiter is on

The m_entropyCoder need to set the bitstream first before calling codeAUD,
otherwise a crash will happen.
quant: delay getTUEntropyCodingParameters() until known necessary
cmake: enable full warnings for remaining TLibEncoder files
sei: fix byte alignment following HRD SEI
hrd: add a comment about when an APS is required, update SEI
rc: fix crash in 2 pass for faster preset (ultrafast - faster)