Fix segmentation fault after saving the profile in profile editor

The segmentation fault was caused by the static QFileDialog in
QtHelpers::GetKVPath() while its parent was being removed. We
should use non-static instance of QFileDialog to workaround this.
The other problems were caused by the chaos in bools set by the
ProfileEditor.