sqlite3db: Use sqlite implicit transactions
sqlite3db: Use sqlite implicit transactions

From the sqlite documentation:

"No changes can be made to the database except within a transaction. Any
command that changes the database (basically, any SQL command other than
SELECT) will automatically start a transaction if one is not already in
effect. Automatically started transactions are committed when the last
query finishes."

As such we can simplify our database code by taking advantage of
automatic transactions. This will also make it easier when we start
working towards being "errcheck" clean.

This change also switches to using defer for releasing locks in places
where that was not yet happening. Any local variables named datastore
were also renamed to db to disambiguate with the general datatstore.

Signed-off-by: Rob Bradford <c49e1dc14cd52e2644816db47123896e0ac79025@intel.com>

kaccardi/ciao,rbradford/ciao,markdryan/ciao,rbradford/ciao,tpepper/ciao,ciao-project/ciao,tpepper/ciao,tpepper/ciao,01org/ciao,kaccardi/ciao,01org/ciao,ciao-project/ciao,markdryan/ciao