rbd: Write the same amount of bytes as we read
rbd: Return null when the copy of the disk failed

This makes sure we stop if the copy fails
rbd: While converting from RAW to RBD, do not write when there is nothing to write
rbd: Close the InputStream and use a long for the offset