Move transport functions and variables to util (media/cast)

When building using jumbo, files get merged and functions and
variables with the same name may end up in the same namespace
and conflict. This happens in:

Since the functions and variables are identical they are
moved to a common util file.

Bug: 867350
Change-Id: I08747781d56b78e9a8783bfec870c7084183062a
Commit-Queue: Chrome Cunningham (In Paris) <>
Reviewed-by: Chrome Cunningham (In Paris) <>
Cr-Commit-Position: refs/heads/master@{#578596}
5 files changed