Bug 939072: Refactor Sqlite connections to support finalization; r=Yoric

--HG--
extra : rebase_source : 2171ab3b3f7cf654ccc37865f5def9fc7f133e3c
Bug 939072: Auto-close Sqlite connections on finalization; r=Yoric

--HG--
extra : rebase_source : 07a2987082723c20b75667615a2d04e497d31f9a