Ticket #49 - better handling for server shutdown while long running tasks are active
https://fedorahosted.org/389/ticket/49
Bug Description: tasks like memberOf fix-up do not check for shutdown events. In my test this causes a shutdown
to hang until the task is complete. I did not get crash in my tests.
Fix Description: The only plugins that appear to have lengthy tasks are: usn, linkedattrtrs, and memberOf. Added checks for g_get_shutdown.
Also cleaned up some code & fixed some indentation issues.