sprintf -> snprintf conversion

Hello, llvmdev!

I'm using LLVM on OpenBSD. This project proactively advocates usage
of 'secure' C apis, especially related to memory bounds checking.
Thus using functions like sprintf/strcpy/etc usually spits out a
linker warning in base toolchain like this one:

/home/proger/dev/llvm/Debug+Asserts/lib/libclangFrontend.a(DocumentXML.o) (.text+0xc65): In function `clang::DocumentXML::escapeString(char const*, unsigned long)':
/home/proger/dev/llvm/tools/clang/lib/Frontend/DocumentXML.cpp:107: warning: sprintf() is often misused, please use snprintf()

I've done some conversions from sprintf to snprintf, please commit those.

snprintf.diff (5.37 KB)

We really should "warning: C is often misused, please use Java".

Does this compile on Windows? I don't think Microsoft has gotten around to providing a snprintf() yet, see Format.h.