filter_intra: make fi mode index entropy coded

Make fi mode index entropy coded instead of using raw bits. Mode
cost estimation in key-frame RDO is updated as well. Modification
to inter frame RDO is not included in this patch.
Also key-frame y mode cdf table is re-trained since fi modes are
attached to DC_PRED

Key frame BDRate:
-0.399% lowres, -0.339% midres

Change-Id: I9ccf478b0a2e48fb1870fe8451e45e2c858a5f63
diff --git a/av1/encoder/block.h b/av1/encoder/block.h
index 8b66278..d79736f 100644
--- a/av1/encoder/block.h
+++ b/av1/encoder/block.h
@@ -257,6 +257,9 @@
 #endif  // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION
   int intra_uv_mode_cost[INTRA_MODES][UV_INTRA_MODES];
   int y_mode_costs[INTRA_MODES][INTRA_MODES][INTRA_MODES];
+#if CONFIG_FILTER_INTRA
+  int filter_intra_mode_cost[PLANE_TYPES][FILTER_INTRA_MODES];
+#endif
   int switchable_interp_costs[SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS];
 #if CONFIG_EXT_PARTITION_TYPES
   int partition_cost[PARTITION_CONTEXTS + CONFIG_UNPOISON_PARTITION_CTX]