Check value of QFile::{open,flush,write}() when saving messages/attachments

To achieve this, a couple of things happened:
 * At every place where an instance of FileDownloadManager is created,
   the transferError() signal from FileDownloadManager is connected to
   the transferError() signal from MessageView.
 * The transferError() signal from MessageView is connected to the
   slotDownloadTransferError() slot from MainWindow (was
   slotDownloadMessageTransferError() first).

Thanks to Thomas and Jan for their feedback.
AttachmentView: no duplicate signals, disable downloadbuttons on download

The signals for the m_openingsManager are now connected in the
constructor, not in AttachmentView::slotOpenAttachment(). This prevents
duplicate connections being created.

While here, also disable the downloadbutton when downloading an
attachment. To implement this, I added a started() signal to
FileDownloadManager, used to indicate when the transfer starts.
Just disabling the downloadbutton in
AttachmentView::slotDownloadAttachment() causes problems when the user
clicks "Download" and then closes the File Dialog without selecting a
file. manager->downloadPart() then returns without downloading the file,
so it doesn't emit a succeeded() or transferError() signal. By creating
a started() signal, we know for sure that the downloadbutton only is
disabled when a transfer really happens. The downloadbutton will be
enabled upon success or failure.

For consistency, FileDownloadManager::downloadMessage() also emits
a started() signal when it starts downloading, although that signal is
not used anywhere.

This commit also renames slotTransferSucceeded() to
slotDeleteTemporaryFile(). I did this because slotTransferSucceeded()
seems to be a general name that can be used for both "Open directly"
and "Download", but it wasn't in the old situation. The "new"
slotTransferSucceeded() only enables the downloadbutton.

AttachmentView::slotOpenAttachment() will only download the attachment
if the temporary file does not exist yet.
GUI: disable clickthrough when online or when message parts are small enough anyway
Fix build warning
Remove FileDownloadManager::data

There is no reason for not using the index directly.
Unify handling of "open attachment" and "download attachment"

The point of this change is to make sure that we don't leak objects when
anything wrong happens during attachment download/opening/whatever. To that end,
the following changes were made:

- The lifetime of both FileDownloadManager instances is now unified; they are
allocated only when the corresponding action is about to take place, saving
memory
- The GUI buttons (QActions, actually) are disabled immediately when the user
clicks them -- this is to prevent multiple requests of the same action
- The FileDownloadManager no longer signals the time it starts transferring
data. Instead, there's a new signal telling the rest of the code that the action
was cancelled, i.e. no data were written.
Merge branch 'bug-644'

Conflicts:
	src/Gui/AttachmentView.cpp
	src/Gui/AttachmentView.h
	src/Gui/PartWidgetFactory.cpp

REVIEW: 110748
REVIEW: 111913