Slicetype: recalculate the frame cost without re-running lookahead for cutree
rc: Initialized qp and aq offsets and QscaleFactor if aqmode is disabled these variables need for cutree analyse
rd level: add functions to do residual encoding at depth 0 for best modes.

This function will be used for rd level 0.
rd level: modify mode-decision logic for rd level 0

In rd level 0, sa8d cost used for mode decision across depths. dct,quant is not done during mode-decision and no recon is generated. Hence Intra has to use original pixels as reference. Residual encoding is done at depth 0 and Intra prediction for the best mode will be done again with recon as reference.
white space nits
TEncSearch: fix gcc warning

remove unused variables and shadowed declarations