OBU: Fix a few bugs
OBU: Fix a few bugs

* The function av1_decode_tg_tiles_and_wrapup performs some per-frame
  initialization; some of this was mistakenly being performed
  once per tile group instead, leading to strange behaviour
  (eg, forgetting loop-restoration coefficients, forgetting
  the boundary information for all but the last tile group, etc.)

  Fix this by pulling all of the initialization code into its
  own function and calling it only if the initialize_flag is set.

* While fixing the above, I realized that the 'context_updated'
  flag in av1_decode_tg_tile_and_wrapup was not behaving as intended:
  The idea is that, when using frame parallel mode, we save the
  frame context early so that the next frame can start decoding.
  Then we don't need to store the frame context at the end of
  the frame, since we already dealt with it at the start of the frame.

  However, this 'context_updated' flag was local to one tile group,
  ie. it got reset to 0 once we started decoding the second tile group.
  So we'd end up storing the frame context again at the end of the frame
  if there was >1 tile group.

  This didn't break anything, but it is a bit weird. So, to match
  the original intent, we ditch the 'context_updated' flag and
  directly check if we're in frame parallel mode when necessary.

* Fix a bug where we read one byte too much from a tile group
  OBU when the extended OBU header was used.

BUG=aomedia:892

Change-Id: Ifbe561de0de35525d809e23915ac5263273e8de7

GrokImageCompression/aom,GrokImageCompression/aom,GrokImageCompression/aom,GrokImageCompression/aom,GrokImageCompression/aom,GrokImageCompression/aom