BUG: Only pass check_same_thread when using sqlite.

Suggested fix for https://github.com/jupyter/jupyterhub/issues/74.  I'd rather this use some sort of SQLAlchemy-blessed parsing function for determining the database engine from the url, but a quick perusal of the docs didn't turn up such a function.