Implement setDocumentEdited too

As requested by @philipgiuliani

Test Plan:
Opened an existing file and made a modification. The icon fades at the same
time the tab close button changes to a circle. Undo makes the icon opaque
again.
Don't use project path as fallback icon for item with no path

Stops the project folder icon appearing in places that don't make sense
like settings and new files.

Test Plan:

  * Opened settings and didn't see the project folder icon
  * Closed all tabs and saw the project folder icon