Cosmetic change to test
Modify tests to be a bit more robust
Modify slurmctld locking to improve performance

Under very heavy load with many thousands of batch job submissions
or job signals, the write lock can be held for very long periods of
time preventing job scheduling, squeue response, etc. This code
inserts a timing break to permit other functions to get the locks.