Fix some obvious deadlock problems with freebsd_umtx_sem2_wait/wake().

This change fixes a couple of deadlock problems.  First, the hold
on the lock should be dropped if it returns on an error.  Second,
the non-shared (private) wake should be used depending on the flag
setting.