Prior to this commit, even if the current graph had never been saved,
we ended up going through the "save current file" use case rather than
the "save as" because the `saveAction` button was always enabled.
This led to the callback being fired before the "save as" dialog had
been closed.
All the actions, file dialogs and message dialogs that are specific to
the application are removed from `main.qml` and placed instead in
`Application.qml`.
Only elements and functions related to the main window remain in
`main.qml`. As such, the `ensureSaved` and `ensureNotComputing` functions,
used when closing the main window, remain in `main.qml`.
Message dialogs that may be opened by these functions however are moved
to `Application.qml` as they are application-specific and can't be opened
on the homepage.
Application dialogs that may need to be called when triggering the closure
of the main window are aliased from `Application.qml` to remain callable
through the `StackView`.