Minor refactor and cleanup in cast tests
Minor refactor and cleanup in cast tests

Details of the cleanup:
 - Don't replace the load() spy with a non-spy
 - Fix an out-of-date comment on an explicit delay in a test
 - Hoist expectMediaInfo helper to make it available for all tests
 - Simulate loading content before the "generic controls messages" to allow the
   use of expectMediaInfo
 - Don't do a substring comparison on a JSON blob, which is inherently
   unreliable, and compare the parsed object structure instead

Related to #2606

Change-Id: Ifb46e223ba800c0e10cbdfa6cb847faa8424cd3d

shaka-project/shaka-player,tvoli/shaka-player,tvoli/shaka-player,tvoli/shaka-player,shaka-project/shaka-player,shaka-project/shaka-player,shaka-project/shaka-player,tvoli/shaka-player