mdbroker.lua: fix indexing nil error on broker_mt:purge_workers()

Be careful about deleting elements in list being traversed.

mdbroker.lua:91: attempt to index local 'worker' (a nil value)
stack traceback:
        mdbroker.lua:91: in function 'purge_workers'
        mdbroker.lua:367: in main chunk
Lua: fix mdclient reply counting