Use RwLock instead of RefCell for local connection
The `local::Connection` struct has the following safety comments:
```rust
// SAFETY: This is safe because we compile sqlite3 w/ SQLITE_THREADSAFE=1
unsafe impl Send for Connection {}
// SAFETY: This is safe because we compile sqlite3 w/ SQLITE_THREADSAFE=1
unsafe impl Sync for Connection {}
```
This is correct with respect to the `*mut ffi::sqlite3` field, but NOT
with respect to the `RefCell<Option<AuthHook>>` field. Heavy load in
a real application using local databases occasionally sees panics due
to concurrent access to this RefCell. N
Nigel Baillie committed
f70484599f44b6d5999f294987321b3132e96102
Parent: a2e9dd4