Generalize Communal Conditions.

This changelist refactors the communal conditions logic
into a general utility class that can be used in other
contexts.

Test: atest ConditionTest
Test: atest ConditionMonitorTest
Bug: 209197297
Change-Id: I265c4b275d259299982381267a028db8091089b1
11 files changed