Fixes #1469 - save button doesn't appear to always work. Also fixes some...

Fixes #1469 replacing old PR https://github.com/NuGet/NuGetGallery/pull/1488, this one is against staging now.

Fixes #1469 - save button doesn't appear to always work. Also fixes some other issues around the dialog such as flickering visible message about 'you are about to navigate away' and issue where dialog is still visible after being 'dismissed' when you use back button to return to the edit page.