Speed up by dropping some ref frames in compound search

Record distortion for each single ref in rd. Rank according to their
distortions. Then in compound search, drop the combination of ref
frames of the largest and second largest distortions

This patch shows neutral performance on google test using lowres
with 20 frame.

Local tests show ~5% speed up over baseline.

Change-Id: I722fe66a0551f5f8a044c57c55caa74e46db7ee8
diff --git a/av1/encoder/speed_features.h b/av1/encoder/speed_features.h
index ba1b31f..9b7d3e6 100644
--- a/av1/encoder/speed_features.h
+++ b/av1/encoder/speed_features.h
@@ -519,6 +519,9 @@
   // Do limited interpolation filter search for dual filters, since best choice
   // usually includes EIGHTTAP_REGULAR.
   int use_fast_interpolation_filter_search;
+
+  // flag to drop some ref frames in compound motion search
+  int drop_ref;
 } SPEED_FEATURES;
 
 struct AV1_COMP;