Fix a bug in best RD cost updating

This CL fixed a bug that sometimes we calculate the best rd cost using
uninitialized rd_div. This CL also includes a small refactoring of
rd_pick_partition().

Speed change: (the smaller the better)
 Performance counter stats for './vpxenc park_joy_480p.y4m --limit=50
 -o output.webm':

with this CL:       297,086,181,136      instructions:u
without this CL:    299,285,835,104      instructions:u

Quality change: (negative is better)
          avg_psnr ovr_psnr  ssim
(low_res)  0.007     0.005  -0.002
(mid_res)  0.022     0.028   0.007
(hd_res)  -0.008    -0.003  -0.014

Change-Id: I8924d8426364304212bcef3aba13346783e6f1a8
2 files changed