fix bgapi race

Commit 69fc2764f5b added support for adding bgapi Job-UUIDs to the filter list if filters are in use, but it had several issues

 - The filter rule was never removed, potentially leading to resource bloat
 - There is a race condition adding the filter rule, and if the job completes before the filter is updated, the callback will be missed

This PR fixes both problems