Rewrite get_tmp_outfile to fix a crash
* src/common.cpp (get_tmp_outfile): Rewrite using c++. (getTmpPathUtf8, CreateFileUtf8): New helpers.
This fixes a crash because somehow snwprintf didn't
always work as I expeted it to. In that case it would
only concatenate the first chars of the attachment filenames
this caused the wcsrchr of the backslash to return NULL and
the following wcschr to find the extension to crash.
This happend on a name conflict in the tmp folder. E.g.
if two mails were open with the same attachment filenames.