loop: cleanup partitions when detaching loop device
Any partitions added by user space to the loop device were being left in
place after detaching the loop device. This was because the detach path
issued a BLKRRPART to clean up partitions if LO_FLAGS_PARTSCAN was set,
meaning that the partitions were auto scanned on attach. Replace this
BLKRRPART with code that unconditionally cleans up partitions on detach
instead.
The user-visible effect of this bug is that the partition devnodes still
show up after detaching the backing file, and I think the partitions
remained in place after attaching a new file even though it had different
or no partitions at all.