Bug 1051172: send a 'stoprecording' signal from the system app so that the camera can stop recording quickly on app transitions r=kgrandon,justindarc a=2.0+

only send the special signal if an app is currently recording

fix the system app and camera unit tests

add tests for shared/js/stop_recording_event.js
Merge pull request #23118 from davidflanagan/bug1051172-v2.0

Bug 1051172: a stoprecording event hack so the camera can stop recording more quickly on app transitions. r=kgrandon,justindarc a=2.0+