Re-enable DB threading checks

### Motivation
Disabling thread checks (#921) has resolved some of the threading issues but has probably caused some new ones. Ref: #929, #933. The proper way to resolve them is by installing synchronization. This has been done on develop (#937) but hasn't been tested adequately, so it is scheduled for the next bugfix release (0.3.1). This PR effectively reverts #921 and re-enables the threading checks. As a result, `release-0.3.0` is prone to the same type of threading issues that affect versions of `develop` prior to #918, as intended.

### Changelog
* Revert "Disable sqlite same thread check. (Re:Issue #654)", commit 03780eab62d3aabce9036e947bfa5faa77ece451.

### Note
As this PR is release-critical, I need 2 LGTMs, one of which has to be by @gubatron.