Fix t/modperl/print.t, t/modperl/printf.t and t/directive/perlloadmodule3.t under perl-5.22.0

I'm working on CPAN RT#101962: Support for perl-5.22.0. The new "Redundant argument in subroutine entry" warning for printf-type functions has revealed a problem in our printf override which causes these tests to fail. In threaded builds we wrongly included the thread context in the count of arguments being passed to perl's sprintf implementation, which then warned that more arguments were being passed than the format string required. With warnings being fatalized in all test scripts this caused a few test scripts to fail.

git-svn-id: https://svn.apache.org/repos/asf/perl/modperl/trunk@1702395 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/xs/Apache2/RequestIO/Apache2__RequestIO.h b/xs/Apache2/RequestIO/Apache2__RequestIO.h
index 6c80830..ca5cb74 100644
--- a/xs/Apache2/RequestIO/Apache2__RequestIO.h
+++ b/xs/Apache2/RequestIO/Apache2__RequestIO.h
@@ -111,6 +111,14 @@
 
     rcfg = modperl_config_req_get(r);
 
+    /* Reduce items by 1 for threaded builds since it otherwise includes
+     * the thread context, which shouldn't be included in the count of
+     * arguments being given to the sprintf() call.
+     */
+#ifdef USE_ITHREADS
+    --items;
+#endif
+
     /* XXX: we could have an rcfg->sprintf_buffer to reuse this SV
      * across requests
      */