b=970773 collect common AudioProcessingEvent tests into a shared function r=ehsan

--HG--
extra : rebase_source : 191bc425627b5290d2963e23d0bb7dfc569d7719
b=970773 remove unnecessary IsSafeToRunScript() test on event loop nsRunnable r=roc

If the event loop is running, then it is safe to run script.

--HG--
extra : rebase_source : c0fb5fddb8e714d4d5ed0cdb7384a95cf23ad9af
b=970773 remove unnecessary locking when getting AudioNodeEngine Node on main thread r=roc

See also bug 914392.

--HG--
extra : rebase_source : 4c3599dd1866adf5045d69ab97ae362a6de4aba5
b=970773 convert destination stream time to DOM time for playbackTime r=roc

--HG--
extra : rebase_source : a4385d56d6cc39d59abf14cca4d399a33fd64173
mochitest for bug 970773

--HG--
extra : rebase_source : d79239ebc2473a95ac0dde796515c935f3ac3ab2