dyanmic registration of gearman functions

Initial checkin for dynamic gearman function registration.
This is not thread safe but does work for most of the use cases
where we want to update gearman worker threads and functions.

functions are getting updated for the following scenarios:
1. project name change
2. project label change
3. project delete
4. project create
5. slave creation - spawns a new worker thread
6. slave deletion - stops an existing worker thread
7. slave state change online/offline
8. slave connection change connect/disconnect

Not working:
1. project state change (disable/enable)
2. master and slave node label change
3. master and slave node executor change

Change-Id: I8e79519198224fc4c93fd16c741fb7de568077b9