My added features

I added a master-foreman relationship on work_queue_status.c I changed a few functions to achieve this but am unsure how to proceed so that I stay consistent with the project. Could you potentially help me resolve the merging conflicts? I could tack the extra arguments on the tail end of the call, but that would change subsequent function calls. I only want to do this if this is indeed the right path to take. I personally put my arguments in the middle of the argument list of this function call, but I will do it at the end if you want.

Also, I fixed a memory leak in do_catalog_query. There was a catalog query create, but it had no complimenting catalog_query_delete. I added that and valgrind showed that the memory was no longer lost. Thanks in advance and have a great day.