engine: Update use of mutex and locks and update the Geary.Nonblocking.Mutex API
Update Geary.Nonblocking.Mutex API to allow it to be used more easily in try/catch blocks as a workaroud for vala#743, and update the code base to use it.
Validate and document use of
lock keyword in the rest of the codebase. Clean up a few details.