Add thread_safety to Connection objects (Fixes #1)

Enabling thread_safety drastically reduces performance so it is set to
False by default. It can be enabled and disabled at any time during the
life of the Connection object.