Fix BasicMarkerFactory by using ConcurrentMap

Problems fixed:
1. unsafe publication because of constructor lacks synchronized(this)
when assigning markerMap
2. detachMarker() lacks synchronization