Only trim JIT metadata if there is no following compilation task.

This reduces the number of trims by 10x on app startup and a compose
scrolling scenario.

Test: test.py
Bug: 313040662
Change-Id: If4c4e451da115848d0cd3a61f184f35f180b7a03
1 file changed