Explicitly specify db transaction

This is basically going back to the implementation in patch set 1 of 96158.

Problem: when creating a new topic, if the query fails at flow_revision table,
it does not rollback the change to flow_workfow and flow_topic_list, this will
cause db inconsistency and throws an error.  It seems like the API is always
committing db changes at end: $lb->shutdown()

Change-Id: I2fea119f6ec67d7052dc81f7a29c61c4c6bac601
Merge "Explicitly specify db transaction"