API AddSyntrans

ver 1.1 add ability to get transaction id, for bot batch processing. Since
it is not necessary to have lots of transaction id for adding a bunch of
data at one go.

Also refactored some database API.

Change-Id: Ied1ca3c23cbae499d220e25a11ae7630236c0b60
Merge "API AddSyntrans"