mdadm: handle write failures to sysfs entries when stopping mdadm
mdadm_stop command tries a number of methods to stop an existing
array. Writes to sysfs fail differently, this patch catches both
IOErrors and OSErrors when writing to sysfs entries, logs and continues
with the stop operation.
Updating the LVM over RAID vmtest to run in dirty_disk mode reproduces
a failure reported and is resolved with this branch.
LP: #1708052