Bug 1063354 - Refactor MSE tests, introduce mediasource.js shared functions.  r=cajbir