rtc: Add dynamic spatial layers to external RC test

Add test to change the number of spatial layers on
the fly. This requires a few fixes in the svc encocder:
1) fix the svc condition in adjust_q_cbr() for adjustment
   based on resolution change
2) add flag to detect change in number of spatial layers,
   and use it to reset the cyclic refresh.

Dynamic dropping/enabling layers based on bitrate
to be added next.

Change-Id: I9d5f7f8e1867f013fd0880408ac45f4f6c715757
diff --git a/av1/encoder/svc_layercontext.h b/av1/encoder/svc_layercontext.h
index 5e983f6..d55ef7d 100644
--- a/av1/encoder/svc_layercontext.h
+++ b/av1/encoder/svc_layercontext.h
@@ -91,6 +91,7 @@
   int temporal_layer_id;
   int number_spatial_layers;
   int number_temporal_layers;
+  int prev_number_spatial_layers;
   int use_flexible_mode;
   int ksvc_fixed_mode;
   /*!\endcond */