Refactor rd and nonrd path.

Split rd and nonrd path in encode_sb_row.

tpl and delta-q related functions are not used in non-rd path.

Change-Id: I38acf461a4dee4f2a857cccb07f6558147d4c873
diff --git a/av1/encoder/nonrd_pickmode.c b/av1/encoder/nonrd_pickmode.c
index f543575..6624da4 100644
--- a/av1/encoder/nonrd_pickmode.c
+++ b/av1/encoder/nonrd_pickmode.c
@@ -2088,8 +2088,7 @@
     if (best_pickmode.best_ref_frame == INTRA_FRAME) {
       // Only consider the modes that are included in the intra_mode_list.
       int intra_modes = sizeof(intra_mode_list) / sizeof(PREDICTION_MODE);
-      int i;
-      for (i = 0; i < intra_modes; i++) {
+      for (int i = 0; i < intra_modes; i++) {
         update_thresh_freq_fact(cpi, x, bsize, INTRA_FRAME, best_mode_idx,
                                 intra_mode_list[i]);
       }