Add thread assertions (2/n)

Add runtime checks for which thread a method should be called from.
These assertions also catch potential deadlocks.

Note we don't add assertions to #expireRollbackForPackage because it is
called from both external and worker threads. We will fix that later.

Bug: 145335013
Test: atest CtsRollbackManagerHostTestCases
Test: atest RollbackTest
Test: atest StagedRollbackTest
Change-Id: I159d325bf157c5a5241571dff2e627d5f7c8e331
1 file changed