Call aom_clear_system_state() before palette RD search

BUG=aomedia:1042,aomedia:1043

Change-Id: Ia7e82cbd280132bbeef41c90c38cbb585db8828a
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 42fc04e..2fc97b7 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -2906,6 +2906,7 @@
 #endif  // CONFIG_FILTER_INTRA
 
   if (colors > 1 && colors <= 64) {
+    aom_clear_system_state();
     int r, c, i, k, palette_mode_cost;
     const int max_itr = 50;
     float *const data = x->palette_buffer->kmeans_data_buf;
@@ -4929,6 +4930,7 @@
 
   colors = colors_u > colors_v ? colors_u : colors_v;
   if (colors > 1 && colors <= 64) {
+    aom_clear_system_state();
     int r, c, n, i, j;
     const int max_itr = 50;
     float lb_u, ub_u, val_u;