Provide classes that logically make up a transaction with == and !=.

Primarily this change is intended to support writing test assertions.
As a side effect, make some improvements to encapsulation of members.

Flag: EXEMPT refactor
Bug: 385156191
Test: presubmit

Change-Id: I51352c78ccfcb0fc6bff655593d7d31771516668
16 files changed