Improve reporting of error messages.
Improve reporting of error messages.

Now, we build up the entire message into a std::string and print it with a single
call to fprintf(); this way, if multiple threads are printing errors/warnings
simultaneously, the results won't be jumbled and intermingled.

(fprintf prints its output atomically, while a set of calls to fputc, which we had
before, didn't give us that..)
patwonder/pbrt-v2-skin,patwonder/pbrt-v2-skin,patwonder/pbrt-v2-skin,patwonder/pbrt-v2-skin,patwonder/pbrt-v2-skin