scripts: fix minor issues with smart filters policy
The filter's destination target was not being found properly due to iterating the matching rules table with ipairs
instead of pairs
... the later is meant to be used with JSON objects. In addition, the filters were not being re-evaluated and linked properly when a device node was removed, this is because of a typo in the find-best-target.lua
script.
See #501 (closed)