Merge changes Ie43c599f,Icd0dbed4,Ic04e180b into nextgenv2

* changes:
  Move av1_indices_from_tree() to common code space.
  Add code to compute in-order mappings for tokens.
  Fix bug in av1_tree_to_cdf_2D() macro.