md: make sure everything is freed when dm-raid stops an array.