Re-create session mutex when starting server or client

If server crashes, the system mutex is not released on Unix systems. It
is needed to explicitly state when to create the mutex.