Extend query table filtering from v5.1 to long-term data query log

As the title says, please consider adding the new filtering from query log also to long-term data query log.

For reference:
https://github.com/pi-hole/AdminLTE/pull/1222