Encapsulate write operations in a transaction when creating a db file
If isf-panel-efl crashes or terminates abnormally while
creating a ime_info db file, the db file would contain
only the partial information of installed IMEs but
it may look normal when trying to read it later.
For this reason, it is better to encapsulate all write
operations in a transaction.
And, since individual insert/delete operation could fail
also, we check the number of installed IMEs too.
Change-Id: If0c5cf1120f3ac2dd7e9f25f360eeb443622de2b