I've borrowed a bunch of code from the data broker because I needed to modify
the code for lazy transaction creation which needed me to pass around the
factories for creating the transaction on the appropriate store.
Basic tests are in place for now which ensure
that we do not create transactions on all the stores when not needed and that on
submit we only have cohorts for the transactions that we created.
The data broker still goes through the three phase commit but since now this has
been optimized with the direct commit enhancement on the datastore itself it should
not matter if we call one method or 4 as far as message passing goes. Calling the 4 methods
may result in extra object creation and such which could be avoided. I would put that in
a follow up commit.
Change-Id: Id77bb1642748e7df15e084a3f0b5e580783f2f8d
Signed-off-by: Moiz Raja <moraja@cisco.com>