Add transaction to sqlite table management.

This shaves off about 0.9seconds from the model store initialization
time.

See #55