Synchronize access to SDWebImageManager's mutable structures (fix #301)