Added getWriteLock() syncs to the class to synchronize writes to the config.
These missing locks were causing ConcurrentModificationExceptions inside
Collectd. Fixes bug NMS-6277.