Initialize error globals to zero
Decref global error on thread exit
Start to test thread-safety of global error object

TODO: Only run these tests for the C bindings