[FIXED JENKINS-18329] - Prevent ConcurrentModificationException

Replace Iterator with ListIterator and use iterator methods for adding
and removing. This should fix any ConcurrentModificationExceptions
Merge pull request #22 from svogt/JENKINS-18329

[FIXED JENKINS-18329] - Prevent ConcurrentModificationException