Use reentrant read write lock for Chunk.java

Signed-off-by: Ross Allan <rallanpcl@gmail.com>