Merge from trunk:

      r57782
      Fix compilation error due to undefined fprintf/stderr.

svn path=/branches/maintenance/1_41/tools/build/; revision=57783
Merge r57791:
Improve detection of MT requirement of MPI.

Some MPI implementation report -lpthread in the compilation flags. Previously,
we'd add -lpthread, but did not set threading=multi, as we really should.
One manifestation of this issue is that when building with such an MPI,
and requesting "threading=single threading=multi", we'd actually try
to build two variants of everything, including "mpi.so" Python extension.
And since Python extensions, at present, do not have their name adjusted
for different variants, we'd get duplicate target name error.

svn path=/branches/maintenance/1_41/tools/build/; revision=57792
Don't match substrings in boost::spirit::qi::symbols::find.

svn path=/branches/maintenance/1_41/tools/jam/; revision=59530
Get curl to follow redirects when downloading docbook files.

svn path=/branches/maintenance/1_41/tools/build/; revision=59531