Delete alloc tracking map outside of critical section

There can be lock order violations otherwise due to runtime shutdown
lock that may get acquired in the condition variable destructor.

Bug: 27506909

(cherry picked from commit 0b8b4a609120b90081d898dbf3c26f68fe80de96)

Change-Id: I6972c450db8856e30c13e27aea94b01943618f64
3 files changed