buffer: implement list::get_contiguous

Return a pointer to a contiguous range of the bufferlist, rebuilding
into a contiguous region as needed.  For now, if we need to rebuild,
we just do the whole thing.  We can obviously optimize this later to
rebuild on the necessary region, but this is good enough for the
(presumably) common case where the needed region is already in fact
contiguous.

Signed-off-by: Sage Weil <sage@redhat.com>
Merge pull request #2849 from ceph/wip-buffer

RFC: buffer: implement list::get_contiguous

Reviewed-by: Haomai Wang <haomaiwang@gmail.com>