[engine] Fire quit() signal when there's nothing left to execute