Bugs were in vp9_rdopt.c Also did minor clean-ups in vp9_encodeframe.c Change-Id: I6fec18e349cd0b810b0772e506927b423db077b6