Merged requested to merge 3801-reduce-memory-bloat-caused-by-delayed-view-detach-lock-order-inversion-v9_16 into v9_16
Detaching the views in the zone_shutdown() could lead to lock-order-inversion between adb->namelocks[bucket], adb->lock, view->lock and zone->lock. Detach the views outside of the section that zone-locked.
(cherry picked from commit 978a0ef8)
Closes #3801 (closed)
Backport of MR !7402 (merged)