Changed TreeMap to a threadsafe implementation

Changed the non threadsafe TreeMap to ConcurrentSkipListMap.
This is threadsafe implementation of a NavigableMap.

I would suggest treating as an experimental build.
If someone can reproduce it somewhat reliable, they should try out a custom build of the CI.