Only init our locking function if Python didnt

Adds quite a bit of complexity, might be better to set ours
unconditionally but still import _ssl so that it doesn't overwrite ours
at some point later.
Update threading stuff for split backend/bindings
Fix some compiler warnings