Add @GuardedBy to ImeVisibilityStateComputer

As a preparation before making ImeVisibilityStateComputer multi-user
aware, this CL adds missing @GuardedBy to ImeVisibilityStateComputer
as well as fixing up some missing synchronized blocks.

The core logic remain unchanged.

Bug: 349904272
Test: presubmit
Test: atest FrameworksInputMethodSystemServerTests:ImeVisibilityStateComputerTest
Flag: EXEMPT refactor
Change-Id: I15c2176c27cde06a54ea078322a653ad69440c5e
3 files changed