QPID-4782: use iterator.remove() to update the map and avoid the CME exposed in r1476219

merged from trunk r1476583


git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/0.22@1477567 13f79535-47bb-0310-9956-ffa450edef68