Cache native WebSQL database objects

I recently ran into an issue where Safari 7 would, after a while, fail to work with WebSQL databases. After investigating, it seemed that the number of concurrent handles towards the WebSQL database exceeded some internal limit, and after that Safari would simply not play nice anymore. Caching the native WebSQL database object seems to do the trick.