Closing DevTools while the profiler was active issued a fire-and-forget stopProfilerAndDiscardProfile() request from ProfilerEventHandling's componentWillUnmount, racing the toolbox connection teardown and surfacing as an uncaught "Connection closed" exception. It also tried to stop recordings that DevTools did not start. Move the responsibility to the perf actor: track whether the running profiler was started from the panel, and on destroy stop it only in that case, leaving recordings started elsewhere (the profiler toolbar popup, MOZ_PROFILER_STARTUP) running. Differential Revision: https://phabricator.services.mozilla.com/D311278