btrfs: dev-replace: report the progress of a canceled replace
btrfs_dev_replace_progress() returns 0 for a canceled replace, so
"btrfs replace status" says it was canceled "at 0.0%" however far it
got. The progress cannot be computed after the fact: it is derived from
cursor_left and the size of the source device, and the source device is
forgotten when the replace stops.
Remember the progress when a running replace fails or is canceled
(btrfs_dev_replace_finishing()) and when a suspended replace is canceled
(btrfs_dev_replace_cancel()), and report it for the CANCELED state. The
value is kept in memory only; a canceled replace loaded from disk after a
remount still reports 0. It is as coarse as the progress of a running
replace: scrub_enumerate_chunks() moves cursor_left to the end of a chunk
only when the copy of that chunk is complete, so a replace that stops
part way through a chunk is reported at the start of that chunk.