Move function to util files (media/mojo)

When building using jumbo, files gets merged and functions
with the same name may end up in the same scope and conflict.

This commits moves such functions to shared util files,
instead of having duplicates.

Bug: 867350
Change-Id: I9986d6d653ef71acbf9583e18aa85a8e34f6e6f0
Reviewed-on: https://chromium-review.googlesource.com/1149781
Reviewed-by: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#577850}
10 files changed