Add const to several API functions that take char *.

In C++, it's an error to pass a string literal to a char* function
without a const_cast().  Rather than require every C++ extension
module to put a cast around string literals, fix the API to state the
const-ness.

I focused on parts of the API where people usually pass literals:
PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type
slots, etc.  Predictably, there were a large set of functions that
needed to be fixed as a result of these changes.  The most pervasive
change was to make the keyword args list passed to
PyArg_ParseTupleAndKewords() to be a const char *kwlist[].

One cast was required as a result of the changes:  A type object
mallocs the memory for its tp_doc slot and later frees it.
PyTypeObject says that tp_doc is const char *; but if the type was
created by type_new(), we know it is safe to cast to char *.
diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c
index f493ecb..59931c3 100644
--- a/Modules/_bsddb.c
+++ b/Modules/_bsddb.c
@@ -650,7 +650,7 @@
     int dlen = -1;
     int doff = -1;
     int flags = 0;
-    char* kwnames[] = { "flags", "dlen", "doff", NULL };
+    static const char* kwnames[] = { "flags", "dlen", "doff", NULL };
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, format, kwnames,
 				     &flags, &dlen, &doff)) 
@@ -1147,9 +1147,10 @@
 #if (DBVER >= 41)
     PyObject *txnobj = NULL;
     DB_TXN *txn = NULL;
-    char* kwnames[] = {"secondaryDB", "callback", "flags", "txn", NULL};
+    static const char* kwnames[] = {"secondaryDB", "callback", "flags", "txn",
+                                    NULL};
 #else
-    char* kwnames[] = {"secondaryDB", "callback", "flags", NULL};
+    static const char* kwnames[] = {"secondaryDB", "callback", "flags", NULL};
 #endif
 
 #if (DBVER >= 41)
@@ -1255,7 +1256,7 @@
     PyObject* retval = NULL;
     DBT key, data;
     DB_TXN *txn = NULL;
-    char* kwnames[] = { "txn", "flags", NULL };
+    static const char* kwnames[] = { "txn", "flags", NULL };
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|Oi:consume", kwnames,
                                      &txnobj, &flags))
@@ -1325,7 +1326,7 @@
     DBC* dbc;
     PyObject* txnobj = NULL;
     DB_TXN *txn = NULL;
-    char* kwnames[] = { "txn", "flags", NULL };
+    static const char* kwnames[] = { "txn", "flags", NULL };
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|Oi:cursor", kwnames,
                                      &txnobj, &flags))
@@ -1350,7 +1351,7 @@
     PyObject* keyobj;
     DBT key;
     DB_TXN *txn = NULL;
-    char* kwnames[] = { "key", "txn", "flags", NULL };
+    static const char* kwnames[] = { "key", "txn", "flags", NULL };
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|Oi:delete", kwnames,
                                      &keyobj, &txnobj, &flags))
@@ -1402,7 +1403,8 @@
     int doff = -1;
     DBT key, data;
     DB_TXN *txn = NULL;
-    char* kwnames[] = {"key", "default", "txn", "flags", "dlen", "doff", NULL};
+    static const char* kwnames[] = {"key", "default", "txn", "flags", "dlen",
+                                    "doff", NULL};
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOiii:get", kwnames,
                                      &keyobj, &dfltobj, &txnobj, &flags, &dlen,
@@ -1469,7 +1471,8 @@
     int doff = -1;
     DBT key, pkey, data;
     DB_TXN *txn = NULL;
-    char* kwnames[] = {"key", "default", "txn", "flags", "dlen", "doff", NULL};
+    static const char* kwnames[] = {"key", "default", "txn", "flags", "dlen",
+                                    "doff", NULL};
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOiii:pget", kwnames,
                                      &keyobj, &dfltobj, &txnobj, &flags, &dlen,
@@ -1558,7 +1561,7 @@
     PyObject* retval = NULL;
     DBT key, data;
     DB_TXN *txn = NULL;
-    char* kwnames[] = { "key", "txn", NULL };
+    static const char* kwnames[] = { "key", "txn", NULL };
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:get_size", kwnames,
                                      &keyobj, &txnobj))
@@ -1601,7 +1604,7 @@
     PyObject* retval = NULL;
     DBT key, data;
     DB_TXN *txn = NULL;
-    char* kwnames[] = { "key", "data", "txn", "flags", NULL };
+    static const char* kwnames[] = { "key", "data", "txn", "flags", NULL };
 
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|Oi:get_both", kwnames,
@@ -1752,7 +1755,7 @@
     DBT key;
     DB_TXN *txn = NULL;
     DB_KEY_RANGE range;
-    char* kwnames[] = { "key", "txn", "flags", NULL };
+    static const char* kwnames[] = { "key", "txn", "flags", NULL };
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|Oi:key_range", kwnames,
                                      &keyobj, &txnobj, &flags))
@@ -1783,17 +1786,17 @@
     PyObject *txnobj = NULL;
     DB_TXN *txn = NULL;
     /* with dbname */
-    char* kwnames[] = {
+    static const char* kwnames[] = {
         "filename", "dbname", "dbtype", "flags", "mode", "txn", NULL};
     /* without dbname */
-    char* kwnames_basic[] = {
+    static const char* kwnames_basic[] = {
         "filename", "dbtype", "flags", "mode", "txn", NULL};
 #else
     /* with dbname */
-    char* kwnames[] = {
+    static const char* kwnames[] = {
         "filename", "dbname", "dbtype", "flags", "mode", NULL};
     /* without dbname */
-    char* kwnames_basic[] = {
+    static const char* kwnames_basic[] = {
         "filename", "dbtype", "flags", "mode", NULL};
 #endif
 
@@ -1877,7 +1880,8 @@
     PyObject* keyobj, *dataobj, *retval;
     DBT key, data;
     DB_TXN *txn = NULL;
-    char* kwnames[] = { "key", "data", "txn", "flags", "dlen", "doff", NULL };
+    static const char* kwnames[] = { "key", "data", "txn", "flags", "dlen",
+                                     "doff", NULL };
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|Oiii:put", kwnames,
                          &keyobj, &dataobj, &txnobj, &flags, &dlen, &doff))
@@ -1917,7 +1921,7 @@
     char* filename;
     char* database = NULL;
     int err, flags=0;
-    char* kwnames[] = { "filename", "dbname", "flags", NULL};
+    static const char* kwnames[] = { "filename", "dbname", "flags", NULL};
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|zi:remove", kwnames,
                                      &filename, &database, &flags))
@@ -2335,9 +2339,9 @@
 #if (DBVER >= 43)
     PyObject* txnobj = NULL;
     DB_TXN *txn = NULL;
-    char* kwnames[] = { "txn", "flags", NULL };
+    static const char* kwnames[] = { "txn", "flags", NULL };
 #else
-    char* kwnames[] = { "flags", NULL };
+    static const char* kwnames[] = { "flags", NULL };
 #endif
 
 #if (DBVER >= 43)
@@ -2477,7 +2481,7 @@
     u_int32_t count=0;
     PyObject* txnobj = NULL;
     DB_TXN *txn = NULL;
-    char* kwnames[] = { "txn", "flags", NULL };
+    static const char* kwnames[] = { "txn", "flags", NULL };
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|Oi:cursor", kwnames,
                                      &txnobj, &flags))
@@ -2521,7 +2525,8 @@
     char* dbName=NULL;
     char* outFileName=NULL;
     FILE* outFile=NULL;
-    char* kwnames[] = { "filename", "dbname", "outfile", "flags", NULL };
+    static const char* kwnames[] = { "filename", "dbname", "outfile", "flags",
+                                     NULL };
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|zzi:verify", kwnames,
                                      &fileName, &dbName, &outFileName, &flags))
@@ -2578,7 +2583,7 @@
     int err;
     u_int32_t flags=0;
     char *passwd = NULL;
-    char* kwnames[] = { "passwd", "flags", NULL };
+    static const char* kwnames[] = { "passwd", "flags", NULL };
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|i:set_encrypt", kwnames,
 		&passwd, &flags)) {
@@ -3018,7 +3023,8 @@
     int dlen = -1;
     int doff = -1;
     DBT key, data;
-    char* kwnames[] = { "key","data", "flags", "dlen", "doff", NULL };
+    static const char* kwnames[] = { "key","data", "flags", "dlen", "doff",
+                                     NULL };
 
     CLEAR_DBT(key);
     CLEAR_DBT(data);
@@ -3104,7 +3110,8 @@
     int dlen = -1;
     int doff = -1;
     DBT key, pkey, data;
-    char* kwnames[] = { "key","data", "flags", "dlen", "doff", NULL };
+    static const char* kwnames[] = { "key","data", "flags", "dlen", "doff",
+                                     NULL };
 
     CLEAR_DBT(key);
     CLEAR_DBT(data);
@@ -3257,7 +3264,8 @@
     int err, flags = 0;
     PyObject* keyobj, *dataobj;
     DBT key, data;
-    char* kwnames[] = { "key", "data", "flags", "dlen", "doff", NULL };
+    static const char* kwnames[] = { "key", "data", "flags", "dlen", "doff",
+                                     NULL };
     int dlen = -1;
     int doff = -1;
 
@@ -3292,7 +3300,7 @@
     int err, flags = 0;
     DBT key, data;
     PyObject* retval, *keyobj;
-    char* kwnames[] = { "key", "flags", "dlen", "doff", NULL };
+    static const char* kwnames[] = { "key", "flags", "dlen", "doff", NULL };
     int dlen = -1;
     int doff = -1;
 
@@ -3362,7 +3370,7 @@
     int err, flags = 0;
     DBT key, data;
     PyObject* retval, *keyobj;
-    char* kwnames[] = { "key", "flags", "dlen", "doff", NULL };
+    static const char* kwnames[] = { "key", "flags", "dlen", "doff", NULL };
     int dlen = -1;
     int doff = -1;
 
@@ -3552,7 +3560,7 @@
     PyObject* retval;
     int dlen = -1;
     int doff = -1;
-    char* kwnames[] = { "recno","flags", "dlen", "doff", NULL };
+    static const char* kwnames[] = { "recno","flags", "dlen", "doff", NULL };
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i|iii:set_recno", kwnames,
 				     &irecno, &flags, &dlen, &doff))
@@ -3746,7 +3754,8 @@
     char *database = NULL;
     PyObject *txnobj = NULL;
     DB_TXN *txn = NULL;
-    char* kwnames[] = { "file", "database", "txn", "flags", NULL };
+    static const char* kwnames[] = { "file", "database", "txn", "flags",
+                                     NULL };
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ss|Oi:dbremove", kwnames,
 		&file, &database, &txnobj, &flags)) {
@@ -3773,7 +3782,8 @@
     char *newname = NULL;
     PyObject *txnobj = NULL;
     DB_TXN *txn = NULL;
-    char* kwnames[] = { "file", "database", "newname", "txn", "flags", NULL };
+    static const char* kwnames[] = { "file", "database", "newname", "txn",
+                                     "flags", NULL };
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "sss|Oi:dbrename", kwnames,
 		&file, &database, &newname, &txnobj, &flags)) {
@@ -3797,7 +3807,7 @@
     int err;
     u_int32_t flags=0;
     char *passwd = NULL;
-    char* kwnames[] = { "passwd", "flags", NULL };
+    static const char* kwnames[] = { "passwd", "flags", NULL };
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|i:set_encrypt", kwnames,
 		&passwd, &flags)) {
@@ -3820,7 +3830,7 @@
     int err;
     u_int32_t flags=0;
     u_int32_t timeout = 0;
-    char* kwnames[] = { "timeout", "flags", NULL };
+    static const char* kwnames[] = { "timeout", "flags", NULL };
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii:set_timeout", kwnames,
 		&timeout, &flags)) {
@@ -4107,7 +4117,7 @@
     int flags = 0;
     PyObject* txnobj = NULL;
     DB_TXN *txn = NULL;
-    char* kwnames[] = { "parent", "flags", NULL };
+    static const char* kwnames[] = { "parent", "flags", NULL };
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|Oi:txn_begin", kwnames,
                                      &txnobj, &flags))
@@ -4937,7 +4947,7 @@
 {
     PyObject* dbenvobj = NULL;
     int flags = 0;
-    char* kwnames[] = { "dbEnv", "flags", NULL};
+    static const char* kwnames[] = { "dbEnv", "flags", NULL};
 
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|Oi:DB", kwnames,
                                      &dbenvobj, &flags))