[dist-8x8] Refactor dist_8x8_sub8x8_txfm_rd() function
[dist-8x8] Refactor dist_8x8_sub8x8_txfm_rd() function

So that, existing diff pixles can be used to calculate sse distortion
for both intra and inter mode blocks.

Change-Id: Ifa79003dbc08f5a49e3246d350469a32060648cf

GrokImageCompression/aom,GrokImageCompression/aom,GrokImageCompression/aom,GrokImageCompression/aom,GrokImageCompression/aom,GrokImageCompression/aom