Improve locking performance for job allocate and step create

This applies the same logic as added for job signal and batch job
submit as in commit ba58d59c2d091af37df38990b8ca32e2e6190807