satyan/sugar — pull request #24 by breber (2013-07-06 15:31:56+00:00)
Title: Only close the database when the Application terminates

I have run into some issues with older Android devices (Gingerbread)
crashing when trying to run nested queries. The database is closed
even though we called openDB(). This change updates the queries
to just call db.getDB() when they need access to the DB, and leave
the closing of the database up to the Application when it terminates.