Wip copy on read

An improved copy-on-read implementation based on the pull request (https://github.com/ceph/ceph/pull/2158) by Min Chen <minchen@ubuntukylin.com>, Li Wang <liwang@ubuntukylin.com> and Yunchuan Wen <yunchuanwen@ubuntukylin.com>. 

The bufferlist holding the entire object from parent is allocated separately.

Also provided a unit test for verifying the implementation.
It feels like you are building another cache mechanism here.  While a copy-up is in progress, the parent image's cache should be able to satisfy read requests.  Eliminating this copy-up cache might also allow the code to be simplified.

If the goal is to prevent multiple concurrent copy-up requests for the same object, how about a map from oid to waiting requests. For reads, if the oid is in the map, no-op cor and forward read to parent; otherwise add the oid w/o appending itself as a waiter, read the whole parent object, kick-off the copy-up, and complete the read.  For writes, if the oid is in the map, append yourself as a waiter on the copy-up; otherwise, add the oid w/ itself as a waiter, read the whole object, kick-off the copy-up, and wait for the copy-up to complete.  When the copy-up completes, if you have any write waiters, restart them so that they can update the copied-up object then remove the oid from the map.