Improve state tracking and error handling in screencastService
Split out from !2080.
Promisify things, make sure to keep track of all the states we manage in the Recorder object and properly tear down the other states if one fails. Also handle more gstreamer errors and the state-changed message on the gst bus.
Required for !2609 (merged)
Edited by Robert Mader