Add a set of 'shared blocks' to every device

If we know a block is shared with another volume (mapped elsewhere
in the cluster) then we will represent this as sharing with the
reserved volume. For private (unshared) blocks we remove them from
the reserved volume on attach.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Superblock.find_device recomputes shared_blocks

This means the output of 'export' will include the current
list of shared blocks.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
attach: only remove the 'private' (non-shared) blocks from the reserved map

Note when we detach we can still union all the blocks with the reserved
map.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
snapshot: create a fully-shared snapshot of an online volume

Note we also add the shared blocks to the reserved volume, so if both
the user volumes were written to, we would fork the blocks twice
where only once is strictly necessary. We expect snapshots to be
read/only, so we shouldn't experience this.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
clone: clone an offline volume where all the blocks are shared

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #1 from djs55/shared-blocks

Add basic support for block sharing