Bug #1599782: Fix segfault on bsddb.db.DB().type().

The problem is that _DB_get_type() can't be called without the GIL
because it calls a bunch of PyErr_* APIs when an error occurs.
There were no other cases in this file that it was called without the GIL.
Removing the BEGIN/END THREAD around _DB_get_type() made everything work.

Will backport.
diff --git a/Misc/NEWS b/Misc/NEWS
index 0e2969e..d58cce5 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -242,6 +242,8 @@
   a2b_qp() function, instead leave it in the string as quopri.decode()
   does.
 
+- Bug #1599782: Fix segfault on bsddb.db.DB().type().
+
 - Bug #1567666: Emulate GetFileAttributesExA for Win95.
 
 - Patch #1576166: Support os.utime for directories on Windows NT+.