Media: Sync with upstream HWA Decoder work.

This patch syncs in with most of the work done here:
https://chromiumcodereview.appspot.com/490233002/