Use a mutex to serial message saving among multiple clients/threads

This work-around shouldn't be necessary, but at least on my Linux/Samba setup, when GitLab sends out notification emails to subscribers and creates 4+ simultaneous SMTP connections and sends email messages, sometimes (often) it ends up with a lock-timeout on the mail base. The file locking should handle the contention fine, but somehow I end up in scenarios where savemsg() takes 30 seconds to complete (the configured SMB lock-timeout is 30 seconds, likely not a coincidence) - and this causes other clients to timeout trying to lock the base. Just use a sharead-mutex here instead as a work-around. The wait time is indefinite, might want to consider using a timed-wait instead.
3 jobs for master in 18 minutes and 47 seconds (queued for 4 seconds)
Status Job ID Name Coverage
  Build
passed #1282
build-sbbs

00:16:08

passed #1283
build-sexpots

00:00:16

passed #1284
build-syncterm

00:02:22