Add a speed feature to limit ref frame search

Limit the ref frame candidates to those picked during the initial
partition search(the adaptive_txb_search speed feature).

Compression quality impact is neutral.

Encoding speed improvement on top of speed 1(30 frames):

                  QP=20    QP=40
akiyo_cif:         15%      22%
cheer_cif:          2%       1%
city_cif:          10%      14%
coastguard_cif:     8%      16%
container_cif:    6.5%    17.5%
crew_cif:         8.5%    11.5%
AVERAGE:          8.4%    13.8%

Enabled for speed 1 and above.

STATS_CHANGED

Change-Id: I5f43fb7c4e9932240f8d163bad663e8249952fa3
diff --git a/av1/encoder/block.h b/av1/encoder/block.h
index 9ae6366..643861f 100644
--- a/av1/encoder/block.h
+++ b/av1/encoder/block.h
@@ -154,6 +154,10 @@
   // cost in the first pass search.
   int cb_partition_scan;
 
+  // If 0, do not allow corresponding ref frame during RD search.
+  uint8_t ref0_candidate_mask[REF_FRAMES + 1];  // The last entry is a counter.
+  uint8_t ref1_candidate_mask[REF_FRAMES];
+
   // Activate constrained coding block partition search range.
   int use_cb_search_range;