* YAM_RE.c, ReadWindow.c: moved the RE_GetThread() function over to
ReadWindow.c and split it into two functions as it contained the same code
twice. Before the thread functionallity didn't work because a variable in
the loop shadowed the result variable and hence the function always returned
failure, even if the mail belonged to a thread of mails. This fixes bug
#1925722.

* MailList.c, FolderList.c: the debug build will now use functions instead of
macros for locking and unlocking of mail and folder lists. These functions
will output an error in case to nested locks or too many unlocks. This
should help avoiding and finding double locks like in bug #1883818.

* YAM_FO.c, YAM_rexx_rxif.c: removed the folder list locking within
FO_GetFolderPosition() to be able to update the folder statistics while the
folder list is already locked. This most probably also fixes bug #1883818.

* YAM_CO.c, YAM_COs.c: the disable mechanism for the SSL/TLS radio buttons was
a bit too harsh and disabled the buttons even if AmiSSL was available. But
as soon as SSL/TLS was switched off once and the user returned to the config
the buttons were always ghosted and didn't allow to reactivate SSL/TLS.

* YAM_FO.c: when modifying the settings of an already existing folder the
folder tree will no longer be saved to make sure that any temporarily
opened/closed folder groups will have the wrong state saved. For new folders
the tree will be saved nevertheless. This fixes bug #1876967.

* YAM_ER.c: the error display wasn't updated if the number of errors reached
the maximum number, because the slider object doesn't trigger its change
hook when there is no real change. Now the update is performed manuall.
This fixes bug #1931532.

* YAM_WR.c, YAM_MAf.c, YAM_mainFolder.h, YAM_TR.c: reworked the bounce message
operation to more comply to the RFC2822 section 3.6.6 (Resent fields)
standard. Previously, a bounce operation touched the original message and
altered the "To:" header field. However, as we are reinserting a bounced
message into the transport stream we have to use the "Resent-#?" headers
as defined in the RFC2822 standard which makes it possible to identify that
the message in question is a resent message.