Add a bunch of GIL release/acquire points in tp_print implementations and for
PyObject_Print().

Closes issue #1164.
diff --git a/Objects/complexobject.c b/Objects/complexobject.c
index 6d1dbde..7de4d5c 100644
--- a/Objects/complexobject.c
+++ b/Objects/complexobject.c
@@ -341,7 +341,9 @@
 	char buf[100];
 	complex_to_buf(buf, sizeof(buf), v,
 		       (flags & Py_PRINT_RAW) ? PREC_STR : PREC_REPR);
+	Py_BEGIN_ALLOW_THREADS
 	fputs(buf, fp);
+	Py_END_ALLOW_THREADS
 	return 0;
 }