IQRM: real-time adaptive RFI masking for radio transient and pulsar searches | Synapse