Move band and edge sao to their own functions.
Calculate edge and band sao separately.
Add better delta distortion calculation to sao.
Adjust SAO mode coding cost for zero offsets.

- Coding zero with TR only takes one bit.

- Even though offset 0 should be fairly common, this doesn't seem to help very
  much and actually increases bdrate on some sequences.
Add SAO coding costs for sao_eo_class, band position and offset sign.

- This reduces bdrate a little bit.

- It seems like increasing the bit cost of using SAO in general
  increases bdrate.
Estimate SAO merge coding costs better.

- This doesn't seem to have very much of an effect. I guess the difference
  between 1 and 2 bits isn't that important.
Apply bit cost fixes to edge band band sao search.

- Increases bdrate slightly. It's still a cleaner solution though and further
  improvements to bit cost estimation might improve things.
Add sao_type_idx to SAO mode cost estimation.
Take into account the coding cost of not using SAO.
Remove unused old mode cost estimation from SAO.
Merge branch 'sao-mode-cost'