Use ReadWriteLock for DataTree.

Although DataTree is lock-free for multiple readers and one writer, it's
still useful to expose this lock. One example would be adding watch,
previous we lock the whole tree while adding watch, now multiple threads
can add watch in parall since they just need to grab the read lock.