Refactor ext-intra

Miscellaneous changes. Mostly code simplification and cleanup.

Make luma max angle delta depend on block size, which is the
way it was before the nextgenv2 branch merge.

Also some fixes for compatibility of ext-intra and alt-intra.

Change-Id: I2ce869e6ba7dee765a8dc4802f5e88040db3df22
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index de78669..e9b8aef 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -5308,11 +5308,11 @@
 #endif  // CONFIG_FILTER_INTRA
 #if CONFIG_EXT_INTRA
 #if CONFIG_INTRA_INTERP
-      if (mbmi->mode != DC_PRED && mbmi->mode != TM_PRED) {
+      if (av1_is_directional_mode(mbmi->mode, bsize)) {
         int p_angle;
         const int intra_filter_ctx = av1_get_pred_context_intra_interp(xd);
-        p_angle =
-            mode_to_angle_map[mbmi->mode] + mbmi->angle_delta[0] * ANGLE_STEP;
+        p_angle = mode_to_angle_map[mbmi->mode] +
+                  mbmi->angle_delta[0] * av1_get_angle_step(mbmi->sb_type, 0);
         if (av1_is_intra_filter_switchable(p_angle))
           ++counts->intra_filter[intra_filter_ctx][mbmi->intra_filter];
       }