Added lock to dict_inc
Put lock in contructor, call constructor from subclasses
Remove lock from CommunityStatistic
Merge pull request #198 from NielsZeilemaker/thread_safe_stats

Added lock to dict_inc