BUG-2006: Rework state tracking

Separate out the two embedded classes to allow easier analysis of
interactions. Introduce a state-tracking class within
DOMStoreTransactionChainImpl with three distinct states: Idle, Allocated
and Shutdown. The allocated state has an internal sub-state when the
transaction has been readied. Perform atomic state transitions using
compare-and-swap.

Change-Id: I4b852d42455d7e07076c56af3626f804ba572770
Signed-off-by: Robert Varga <rovarga@cisco.com>
Merge "BUG-2006: Rework state tracking"