btrfs: add functions to get and put a device for replace target
For the replace tests we need a device as a spare device,
here functions _spare_dev_get() and _spare_dev_put()
will get it from the SCRATCH_DEV_POOL_SAVED, which is set
when _scratch_dev_pool_get() is called, and is based on how
many has already been assigned to SCRATCH_DEV_POOL.
usage:
_scratch_dev_pool_get 3
_spare_dev_get
SPARE_DEV will have a device set which can be
used as the replace target device.
_spare_dev_put
_scratch_dev_pool_put
_spare_dev_get() will pick the next device after SCRATCH_DEV_POOL
devices, from the SCRATCH_DEV_POOL_SAVED, and assigns it to
SPARE_DEV. _spare_dev_put() will set to SPARE_DEV to null.