Add support for multiple forms of blacklist queries using matches.

It supports both literal and last octet matches from the dnsbl.
If matches is not present, the old behaviour is used.