DANGER

If you have more than one connection to a file, you MUST use the EXACT SAME NAME for the file each time, including case. The sqlite code uses a simple string compare to see if there is already a connection. Opening a connection to "Foo.sqlite" and "foo.sqlite" will CORRUPT YOUR DATABASE.

Opening connections from more than one thread to the same database will also CORRUPT YOUR DATABASE. All connections share the same sqlite cache, and the cache is not threadsafe.

The connection object returned by this function is not threadsafe. You must use it only from the thread you created it from.