Sherr issue 510

This update improves cobbler's concurrency handling, locking / releasing sensitive resources in collections as appropriate to avoid concurrent modification errors. This update also prevents the '502 proxy errors' that were caused by the worker threads waiting indefinitely for a thread that had died to release the lock by placing all of the lock releases in a try-finally block.