Close the attachment file before notifying listeners about the added attachment.
This facilitates the work for some plugins that need to reopen the file. Patch by anatoly techtonik, thanks!
Closes #7978.
Authored by: cboos 2009-02-03
Parent: [r7820]
Child: [r7822]