Fixed some cleanup related to closing documents

The cleanup was happening on document close requests rather than when
documents are actually being closed, and depending on the connection
order it may even have happened after the close request was already
handled.
Fixed the file system watcher in case a watched file is replaced

This approach seems to work for files saved with vim. Maybe it also
fixes the problem with watching tilesets saved by Photoshop.
Watch maps for changes and support reloading

The reload happens automatically when there are no currently unsaved
changes. It can also be triggered manually from the File menu. When
there are unsaved changes, the user is notified about changes to the map
file by a non-modal popup.

Sponsored-by: FlatRedBall.com