Fix crash on exiting PIE due to PIE app domain being destroyed too early

The PIE app domain was being destroyed before native script components
destroyed their managed counterparts. PIE app domain destruction is now
delayed until after the UE garbage collector runs. However, there are
still a couple of issues to address to ensure proper cleanup when
exiting PIE.