rc: bug fix for 2 pass when bframes = 0. fixes Issue #77
Merge with stable
search: comment nits
search: measure RDO of intra modes within 12% of least cost [CHANGES OUTPUTS]

This version adaps the number of RD measured modes by param.rdLevel (aka preset)
and by depth. This gives a non-trivial speedup to the very fast presets which
use frequent keyframes and helps improve compression in slower presets.

all presets use this function to encode I slices, so every encode is affected.

Previous behavior:
  RD measure top N least sa8d cost intra modes and all most probable modes where
  N was depth-based: intraModeNumFast[] = { 8, 8, 3, 3, 3 }; // 4x4, 8x8, etc

New behavior:
  RD measure up to N modes that are within 12% of best sa8d cost or are most
  probable. where N if a function of rd-level and depth

The new behavior may measure fewer modes than before may skip some most-probable
modes if there are plenty of other modes which are near the best cost. Since
mode signal cost is included already, this seems ok.

The general idea is that if 1-2 modes have much better sa8d cost than all the
others, then we are likely wasting our time RD measuring 8-11 modes. We're
betting that sa8d cost is a somewhat decent predictor of RD cost.

Note that I initially tried without a limit (measure all within 12% or MPM) but
for some clips this was a horrible perf trade-off. In some situations all the
intra modes might measure close together (flat source block) and we would end
up measuring most or all of the intra modes for very little gain. So this
version re-introduces a "top N candidate list" but does not bother trying to
keep the list sorted since it is small
search: header cleanups, no functional change
sao: some cleanups
doc: fix typo and nit in threading page
doc: describe performance impact of SAO
param: preset tuning changes

1. disable SAO in superfast

Recent changes have made --no-sao substantially faster than SAO, which has
made ultrafast preset much much faster than superfast.  By disabling SAO in
superfast, it is now roughly half-way between ultrafast and veryfast again.

2. Enable weighted prediction for B slices in slower, veryslow, and placebo

Weighted prediction for B can sometimes be beneficial, so turn it on for slower
encodes.