Added support for thread-safe pdb statements (that won't let pdb be active in more than one thread)
Added environment variable to prefer pdb over winpdb