FuseDaemon: Move to std::lock_guard.

The only non-trivial change here is the untangling of the complicated
goto statements in pf_rename.

This change reveals several potential thread safety issues that will
be addressed in a follow-up.
- Accesses to node->handles and node->dirhandles are inconsistently
  protected. They should all be guarded by fuse->lock (or a finer
  grained lock if a coarse lock proves to be a problem).
- Calls to do_forget must be guarded by fuse->lock but not all of them
  are.

Test: atest FuseDaemonHostTest
Change-Id: I9f32d359cfda6a5de365bf156867c6367b6437e3
1 file changed