CQ and two pass rate control.
Changes to the selection of Q limits for two pass and two pass CQ mode. Allowance made for Mode and motion vector costs. Some refactoring of common code. For Derf and YT sets CQ mode average improvement circa 1% (SSIM and Global PSNR). Some increased tendency to undershoot even when user CQ not reached. Patch2: Removed some test code accidentally merged. Change-Id: Icf74d13af77437c08602571dc7a97e747cce5066