Change speed features for good quality(cpu-used=5)

The existing speed features produce horrible encoding results, almost
30% worse than cpu-used=4, this commit adjust the speed features to
produce relatively resonable results to be within 3%-5% of cpu-used=4.

Change-Id: I0ca6ebafb33024d4a0cbcf04c78a4a00b8dd1ecf
Refactor rate distortion cost structure in non-RD coding mode

This commit refactors the rate distortion structure used in the
non-RD coding mode and saves a few RDCOST calculations.

Change-Id: I62c3416c300d2c5372f21b96d93a6b633a34ab3a
Merge "Change speed features for good quality(cpu-used=5)"
Merge "Refactor rate distortion cost structure in non-RD coding mode"