Added named semaphore context locking

@NOTE:
There was an race condition between session manager and php upload process.

The race condition manifest when a user's connection failed, deleted a file,
etc, but attempts to upload the file after they resolved their issue.

Regardless, the old upload session would be marked GC in some indefinate time
in the future; but if the both contends to modify the file (i.e. gc is
deleteing file while php process is uploading), then we create a race condition.

The solution is two folds:

1. Both php and session daemon contends for lock, but daemon process only
   "tries" to lock it (unblock lock), and would trigger IOError if locked by
   php session.  Daemon abandons unlink operation and wait for next gc cycle
   on this record.

2. Session daemon obtained lock.  It cannot outright unlink the file since
   a new chunk could be in transit.  The session daemon checks for the last
   modified time on the file, only delete it if expired.

The lock is released and destroyed if the next time session daemon found this
file missing.  If missing, it could mean one of two things:

1. That the file had been submitted
2. That the file was explicitly deleted by user request.

For this particular case, the named semaphore need not remain, and should be
garbage collected.  We will revisit named semaphore recycle problem should
there be a need