md: move bitmap_destroy to the beginning of __md_stop