Implement twopass support for the xiphrc system

This commit implements support for twopass encoding using the xiphrc
experimental rate control system. Most of the code and logic comes
from the theora project encoder.

Currently support is limited to the bitrate targeting mode of the
rate control system and while it does visibly improve quality and does
bring rate closer to the target than the one pass mode there's still
tuning and bug fixing to be done.

Change-Id: Iae0d65bbce5ddfbb95b436e2238a43d6100a23b3
5 files changed