Enqueue actions by monitor ID rather than query ID
Created by: camdencheek
When we have results for a monitor's trigger, it makes more sense to enqueue by the monitor the trigger is attached to, rather than enqueuing by joining the trigger itself. It just makes this code a bit more reusable, and it simplifies the SQL.
Stacked on #28517