Revert "Revert "Prevent UAF issues caused by static destructors""

We were not initializing the frame_pop_enabled field of EventHandler
so it was undefined. If it happened to be true then the FramePop
handlers will never be installed and the FramePop events will never be
triggered.

This reverts commit 6a94cec7343bf006234b62525398c83bb55858eb.

Reason for revert: fixed issue with frame pop

Test: ./test/testrunner/testrunner.py -a --host -t 923
Bug: 69591477

Change-Id: Id47f91a76b6e7c9326e94d7cbdf8c5472bffb58a
13 files changed