rec: be more memory efficient handling RPZ reloads
There were two things non-optimal:
- The old zone contents is being kept in memory during a sleep for the
next iteration and then thrown away. Fix: throw away before the sleep.
- The Lua config is kept alive. This causes refs to old config
data to stay around until all RPZ threads have cleared that config.
Fix that by making the config loop-local and load it after the sleep
call.
Above claims confirmed by adding some debug code showing the ref counts
for a config with many RPZs.