proctrack/cgroup - Add lock preventing race condition

proctrack/cgroup - Add locking to prevent race condition where one job step
is ending for a user or job at the same time another job stepsis starting
and the user or job container is deleted from under the starting job step.
bug 447
Rewrite of cgroup locking

There was already cgroup locking in the version 14.03 code base
using different variable names and slighly different logic from
that in commit 3f6d9e3670cd931d987cb65e53e2cfbb4c153eb5.
This commit is a variant of that commit in order to make the logic
in version 2.6 match that of our next release (logic which is
already pretty well tested).
bug 447
Merge branch 'slurm-2.6'

Conflicts:
	src/plugins/proctrack/cgroup/proctrack_cgroup.c