Prompt to save modified items when closing a pane via pane:close

Fixes #4094
Merge pull request #4129 from atom/ns-fix-pane-close

Prompt to save modified items when closing a pane via pane:close