Upgrade the creation date field of the existing emails, setting it to either
the emails received date (if it exists) or the emails sent date (if it exists).
Copy of the method from WebworkVelocityServlet, adding a flush for the writer to get around problems we
were having with truncated content when a filter started talking directly to the servletresponse writer
without the webwork writer having been flushed in the meanwhile.
Moves an Attachment to a new file name or content object
This method assumes that the filename and/or content of the attachment
(and its previous versions) have already been updated.