Improve performance of beforeRead handling
* src/mapihelp.cpp (string_to_type): New Helper. (mapi_get_message_type, mapi_change_message_class): Use it. (mapi_change_message_class): Take optional type retval. * src/inspectors.cpp, src/session-events.cpp, src/user-events.cpp, src/message.cpp: Udpate calls.
Looking at an improvement for T3542 i measured the
time spent in beforeRead for "non crypto" mails.
With this change, which fixes a TODO the time is
halved because way fewer MAPI calls are required.